Added in the events for Maru and Sebastian.

This commit is contained in:
JoshuaNavarro 2019-12-07 17:09:40 -08:00
parent 4c4fc7900b
commit c69c05aa93
5 changed files with 330 additions and 112 deletions

View File

@ -140,13 +140,64 @@ namespace Omegasis.HappyBirthday
["Mail:birthdayMom"] = "Dear @,^ Happy birthday sweetheart. It's been amazing watching you grow into the kind, hard working person that I've always dreamed that you would become. I hope you continue to make many more fond memories with the ones you love. ^ Love, Mom ^ P.S. Here's a little something that I made for you. %item object 221 1 %%", ["Mail:birthdayMom"] = "Dear @,^ Happy birthday sweetheart. It's been amazing watching you grow into the kind, hard working person that I've always dreamed that you would become. I hope you continue to make many more fond memories with the ones you love. ^ Love, Mom ^ P.S. Here's a little something that I made for you. %item object 221 1 %%",
["Mail:birthdayDad"] = "Dear @,^ Happy birthday kiddo. It's been a little quiet around here on your birthday since you aren't around, but your mother and I know that you are making both your grandpa and us proud. We both know that living on your own can be tough but we believe in you one hundred percent, just keep following your dreams.^ Love, Dad ^ P.S. Here's some spending money to help you out on the farm. Good luck! %item money 5000 5001 %%", ["Mail:birthdayDad"] = "Dear @,^ Happy birthday kiddo. It's been a little quiet around here on your birthday since you aren't around, but your mother and I know that you are making both your grandpa and us proud. We both know that living on your own can be tough but we believe in you one hundred percent, just keep following your dreams.^ Love, Dad ^ P.S. Here's some spending money to help you out on the farm. Good luck! %item money 5000 5001 %%",
["Mail:birthdayJunimos"] = "Please come to the community center. ^ Sincerly,^ -The Junimos", ["Mail:birthdayJunimos"] = "Please come to the community center. ^ Sincerly,^ -The Junimos",
["Mail:birthdayDatingPenny"] = "Dear @. ^ My mom and I decided to have a little birthday party for you. Could you come by sometime today?^Sincerly,^ -Penny", ["Mail:birthdayDatingPenny"] = "Dear @. ^ My mom and I decided to have a little birthday party for you. Could you come by sometime today?^Sincerly,^ -Penny",
["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",
["Happy Birthday: Star Message"] = "It's your birthday today! Happy birthday!", ["Happy Birthday: Star Message"] = "It's your birthday today! Happy birthday!",
["Happy Birthday: Farmhand Birthday Message"] = "It's @'s birthday! Happy birthday to them!", ["Happy Birthday: Farmhand Birthday Message"] = "It's @'s birthday! Happy birthday to them!",
["Season"] = "Season", ["Season"] = "Season",
["Date"] = "Date", ["Date"] = "Date",
["Event:JunimoBirthdayParty_0"] = "It looks like the junimos wanted to throw you a party!", ["Event:JunimoBirthdayParty_0"] = "It looks like the junimos wanted to throw you a party!",
["Event:JunimoBirthdayParty_1"] = "It looks like there was some cake left over too!", ["Event:JunimoBirthdayParty_1"] = "It looks like there was some cake left over too!",
["Event:DatingPennyBirthday_Pam:0"] = "Come on in kid. The party has just begun!$h",
["Event:DatingPennyBirthday_Pam:1"] = "Here, pull up a seat and have a beer to celebrate!",
["Event:DatingPennyBirthday_Pam:2"] = "Alright, cheers kid! Happy birthday and here is to another great year! $h",
["Event:DatingPennyBirthday_Penny:0"] = "Oh, @ you are here just in time!$h",
["Event:DatingPennyBirthday_Penny:1"] = "I thought it would be nice if we threw you a small party. Granted it's not much but I hope you like it. $l",
["Event:DatingPennyBirthday_Penny:2"] = "Mom!$a",
["Event:DatingPennyBirthday_Penny:3"] = "*sigh* Well make yourself at home. I'll get the cake out.",
["Event:DatingPennyBirthday_Penny:4"] = "Happy birthday @. Here is hoping we get to spend many more birthdays together. $l",
["Event:DatingPennyBirthday_Finish:0"] = "It was nice celebrating my birthday with Pam and Penny.",
["Event:DatingPennyBirthday_Finish:1"] = "Looks like there was some leftover cake and beer too!",
["Event:DatingMaruBirthday_Demetrius:0"] = "Welcome @, come in and make yourself at home.$h",
["Event:DatingMaruBirthday_Demetrius:1"] = "I agree. I think this party is perfecty wonderful. Besides studies show that your productivity is boosted when you have fun once in a while.$h",
["Event:DatingMaruBirthday_Maru:0"] = "Ohh @, you are just in time for the party.$h",
["Event:DatingMaruBirthday_Maru:1"] = "I tried to build you a robot to help you out on your farm as a gift but I ran out of time. Hopefully I'll have it done by next year.",
["Event:DatingMaruBirthday_Maru:2"] = "Alright, @ make a wish!",
["Event:DatingMaruBirthday_Maru:3"] = "Happy birthday @. Hopefully this is just the beginning of many more years to come.$l",
["Event:DatingMaruBirthday_Robin:0"] = "You know I have to agree. I think it's the thought that counts not necessarily the gift.$h",
["Event:DatingMaruBirthday_Robin:1"] = "Oh I think the cake is ready!",
["Event:DatingMaruBirthday_Sebastian:0"] = "You know I think just having this party is good enough. No need to go overboard.",
["Event:DatingMaruBirthday_Sebastian:1"] = "Sweet, let's eat.",
["Event:DatingMaruBirthday_Finish:0"] = "It was nice celebrating my birthday with Maru and her family.",
["Event:DatingMaruBirthday_Finish:1"] = "It looks like there was some leftover cake too!",
["Event:DatingSebastianBirthday_Demetrius:0"] = "I agree. I think this party is perfecty wonderful. Besides studies show that your productivity is boosted when you have fun once in a while.$h",
["Event:DatingSebastianBirthday_Demetrius:1"] = "Alright, @ go ahead and make a wish!$h",
["Event:DatingSebastianBirthday_Maru:0"] = "Happy birthday @. Honestly, I'm a bit surprised that we are having this party. Sebastian never been too keen on celebrations.",
["Event:DatingSebastianBirthday_Maru:1"] = "Oh sweet we finally get to have some cake! Let me get you the first slice @!$h",
["Event:DatingSebastianBirthday_Robin:0"]= "Welcome @, come in and make yourself at home.$h",
["Event:DatingSebastianBirthday_Robin:1"] = "Hey now, I think that it's great that Sebastian wanted to have a party for @. $h",
["Event:DatingSebastianBirthday_Robin:2"] = "Oh I think the cake is ready!",
["Event:DatingSebastianBirthday_Sebastian:0"] = "Hey @ you are here just in time. Mom is just finishing the cake right now. $h",
["Event:DatingSebastianBirthday_Sebastian:1"] = "Honestly... and they wonder why I don't do stuff like this more often.",
["Event:DatingSebastianBirthday_Sebastian:2"] = "Happy Birthday @. I'm glad we got to spend time like this together. $h",
["Event:DatingSebastianBirthday_Finish:0"] = "It was nice celebrating my birthday with Sebastian and his family.",
["Event:DatingSebastianBirthday_Finish:1"] = "It looks like there was some leftover cake too!",
["Event:PartyOver"] = "That was a fun party. Back to work!" ["Event:PartyOver"] = "That was a fun party. Back to work!"
}, },

View File

@ -30,7 +30,7 @@ namespace Omegasis.HappyBirthday.Framework
conditions.Add(new StardustCore.Events.Preconditions.PlayerSpecific.JojaMember(false)); conditions.Add(new StardustCore.Events.Preconditions.PlayerSpecific.JojaMember(false));
conditions.Add(new CommunityCenterCompleted(false)); conditions.Add(new CommunityCenterCompleted(false));
//conditions.Add(new HasUnlockedCommunityCenter()); //Infered by the fact that you must enter the community center to trigger this event anyways. //conditions.Add(new HasUnlockedCommunityCenter()); //Infered by the fact that you must enter the community center to trigger this event anyways.
EventHelper e = new EventHelper("CommunityCenterBirthday",19950, conditions, new EventStartData("playful", 32, 12, new EventStartData.FarmerData(32, 22, EventHelper.FacingDirection.Up),new List<EventStartData.NPCData>())); EventHelper e = new EventHelper("CommunityCenterBirthday", 19950, conditions, new EventStartData("playful", 32, 12, new EventStartData.FarmerData(32, 22, EventHelper.FacingDirection.Up), new List<EventStartData.NPCData>()));
e.AddInJunimoActor("Juni", new Microsoft.Xna.Framework.Vector2(32, 10), StardustCore.IlluminateFramework.Colors.getRandomJunimoColor()); e.AddInJunimoActor("Juni", new Microsoft.Xna.Framework.Vector2(32, 10), StardustCore.IlluminateFramework.Colors.getRandomJunimoColor());
e.AddInJunimoActor("Juni2", new Microsoft.Xna.Framework.Vector2(30, 11), StardustCore.IlluminateFramework.Colors.getRandomJunimoColor()); e.AddInJunimoActor("Juni2", new Microsoft.Xna.Framework.Vector2(30, 11), StardustCore.IlluminateFramework.Colors.getRandomJunimoColor());
@ -84,7 +84,7 @@ namespace Omegasis.HappyBirthday.Framework
e.RemoveJunimoAdvanceMove("Juni6Tank"); e.RemoveJunimoAdvanceMove("Juni6Tank");
e.junimoFaceDirection("Juni6Tank", EventHelper.FacingDirection.Down); e.junimoFaceDirection("Juni6Tank", EventHelper.FacingDirection.Down);
e.junimoFaceDirection("Juni7", EventHelper.FacingDirection.Right); e.junimoFaceDirection("Juni7", EventHelper.FacingDirection.Right);
e.FlipJunimoActor("Juni8",true); e.FlipJunimoActor("Juni8", true);
e.junimoFaceDirection("Juni8", EventHelper.FacingDirection.Left); e.junimoFaceDirection("Juni8", EventHelper.FacingDirection.Left);
e.playSound("junimoMeep1"); e.playSound("junimoMeep1");
@ -104,15 +104,22 @@ namespace Omegasis.HappyBirthday.Framework
} }
/// <summary>
/// Birthday event for when the player is dating Penny.
/// Status: Completed.
/// </summary>
/// <returns></returns>
public static EventHelper DatingBirthday_Penny() public static EventHelper DatingBirthday_Penny()
{ {
NPC penny = Game1.getCharacterFromName("Penny");
NPC pam = Game1.getCharacterFromName("Pam");
List<EventPrecondition> conditions = new List<EventPrecondition>(); List<EventPrecondition> conditions = new List<EventPrecondition>();
conditions.Add(new FarmerBirthdayPrecondition()); conditions.Add(new FarmerBirthdayPrecondition());
conditions.Add(new LocationPrecondition(Game1.getLocationFromName("Trailer"))); conditions.Add(new LocationPrecondition(Game1.getLocationFromName("Trailer")));
conditions.Add(new TimePrecondition(600, 2600)); conditions.Add(new TimePrecondition(600, 2600));
conditions.Add(new StardustCore.Events.Preconditions.NPCSpecific.DatingNPC(penny));
NPC penny = Game1.getCharacterFromName("Penny");
NPC pam = Game1.getCharacterFromName("Pam");
//conditions.Add(new StardustCore.Events.Preconditions.NPCSpecific.DatingNPC(Game1.getCharacterFromName("Penny")); //conditions.Add(new StardustCore.Events.Preconditions.NPCSpecific.DatingNPC(Game1.getCharacterFromName("Penny"));
EventHelper e = new EventHelper("BirthdayDating:Penny", 19951, conditions, new EventStartData("playful", 12, 8, new EventStartData.FarmerData(12, 9, EventHelper.FacingDirection.Up), new List<EventStartData.NPCData>() { EventHelper e = new EventHelper("BirthdayDating:Penny", 19951, conditions, new EventStartData("playful", 12, 8, new EventStartData.FarmerData(12, 9, EventHelper.FacingDirection.Up), new List<EventStartData.NPCData>() {
@ -125,30 +132,29 @@ namespace Omegasis.HappyBirthday.Framework
e.moveFarmerUp(1, EventHelper.FacingDirection.Up, false); e.moveFarmerUp(1, EventHelper.FacingDirection.Up, false);
e.actorFaceDirection("Penny", EventHelper.FacingDirection.Down); e.actorFaceDirection("Penny", EventHelper.FacingDirection.Down);
string starting = "Oh, @ you are here just in time!$h";
//starting = starting.Replace("@", Game1.player.Name); //starting = starting.Replace("@", Game1.player.Name);
e.speak(penny, starting); e.speak(penny, HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingPennyBirthday_Penny:0"));
e.speak(pam, "Come on in kid. The party has just begun!$h"); e.speak(pam, HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingPennyBirthday_Pam:0"));
e.speak(penny, "I thought it would be nice if we threw you a small party. Granted it's not much but I hope you like it. $l"); e.speak(penny, HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingPennyBirthday_Penny:1"));
e.speak(pam, "Here, pull up a seat and have a beer to celebrate!"); e.speak(pam, HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingPennyBirthday_Pam:1"));
e.emote_Angry("Penny"); e.emote_Angry("Penny");
e.speak(penny, "Mom!$a"); e.speak(penny, HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingPennyBirthday_Penny:2")); //penny2
e.speak(penny, "*sigh* Well make yourself at home. I'll get the cake out."); e.speak(penny, HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingPennyBirthday_Penny:3")); //penny3
e.moveActorLeft("Penny", 3, EventHelper.FacingDirection.Up, true); e.moveActorLeft("Penny", 3, EventHelper.FacingDirection.Up, true);
e.moveFarmerRight(2, EventHelper.FacingDirection.Up, false); e.moveFarmerRight(2, EventHelper.FacingDirection.Up, false);
e.moveFarmerUp(3, EventHelper.FacingDirection.Down, false); e.moveFarmerUp(3, EventHelper.FacingDirection.Down, false);
e.moveActorRight("Penny", 5, EventHelper.FacingDirection.Up, true); e.moveActorRight("Penny", 5, EventHelper.FacingDirection.Up, true);
e.moveActorUp("Penny", 1, EventHelper.FacingDirection.Up, true); e.moveActorUp("Penny", 1, EventHelper.FacingDirection.Up, true);
e.speak(pam, "Alright, cheers kid! Happy birthday and here is to another great year! $h"); e.speak(pam, HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingPennyBirthday_Pam:2")); //pam2
e.speak(penny, "Happy birthday @. Here is hoping we get to spend many more birthdays together. $l"); e.speak(penny, HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingPennyBirthday_Penny:4"));//penny4
e.emoteFarmer_Heart(); e.emoteFarmer_Heart();
e.emote_Heart("Penny"); e.emote_Heart("Penny");
e.globalFadeOut(0.010); e.globalFadeOut(0.010);
e.setViewportPosition(-100, -100); e.setViewportPosition(-100, -100);
e.showMessage("It was nice celebrating my birthday with Pam and Penny."); e.showMessage(HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingPennyBirthday_Finish:0")); //penny party finish 0
e.showMessage("Looks like there was some leftover cake and beer too!"); e.showMessage(HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingPennyBirthday_Finish:1"));// penny party finish 1
e.addObjectToPlayersInventory(220, 1, false); e.addObjectToPlayersInventory(220, 1, false);
e.addObjectToPlayersInventory(346, 1, false); e.addObjectToPlayersInventory(346, 1, false);
@ -158,11 +164,74 @@ namespace Omegasis.HappyBirthday.Framework
return e; return e;
} }
/*
/// <summary>
/// Birthday event for when the player is dating Maru.
/// Finished.
/// </summary>
/// <returns></returns>
public static EventHelper DatingBirthday_Maru() public static EventHelper DatingBirthday_Maru()
{ {
List<EventPrecondition> conditions = new List<EventPrecondition>();
conditions.Add(new FarmerBirthdayPrecondition());
conditions.Add(new LocationPrecondition(Game1.getLocationFromName("ScienceHouse")));
conditions.Add(new TimePrecondition(600, 2600));
NPC maru = Game1.getCharacterFromName("Maru");
NPC sebastian = Game1.getCharacterFromName("Sebastian");
NPC robin = Game1.getCharacterFromName("Robin");
NPC demetrius = Game1.getCharacterFromName("Demetrius");
conditions.Add(new StardustCore.Events.Preconditions.NPCSpecific.DatingNPC(maru));
EventHelper e = new EventHelper("BirthdayDating:Maru", 19952, conditions, new EventStartData("playful", 28, 12, new EventStartData.FarmerData(23, 12, EventHelper.FacingDirection.Right), new List<EventStartData.NPCData>() {
new EventStartData.NPCData(maru,27,11, EventHelper.FacingDirection.Down),
new EventStartData.NPCData(sebastian,26,13, EventHelper.FacingDirection.Up),
new EventStartData.NPCData(robin,28,9, EventHelper.FacingDirection.Up),
new EventStartData.NPCData(demetrius,30,11, EventHelper.FacingDirection.Left)
}));
e.globalFadeIn();
e.moveFarmerRight(3, EventHelper.FacingDirection.Right, true);
e.npcFaceDirection(maru, EventHelper.FacingDirection.Left);
e.npcFaceDirection(demetrius, EventHelper.FacingDirection.Left);
//Seb is already facing up.
e.npcFaceDirection(robin, EventHelper.FacingDirection.Down);
//Dialogue goes here.
//Seriously improve dialogue lines. Maru is probably the NPC I know the least about.
e.speak(maru, GetTranslatedString("Event:DatingMaruBirthday_Maru:0")); //maru 0
e.speak(demetrius, GetTranslatedString("Event:DatingMaruBirthday_Demetrius:0")); //demetrius 0
e.speak(maru, GetTranslatedString("Event:DatingMaruBirthday_Maru:1"));//Maru 1 //Spoiler she doesn't.
e.speak(sebastian, GetTranslatedString("Event:DatingMaruBirthday_Sebastian:0")); //sebastian 0
e.speak(robin, GetTranslatedString("Event:DatingMaruBirthday_Robin:0")); //robin 0
e.speak(demetrius, GetTranslatedString("Event:DatingMaruBirthday_Demetrius:1")); //demetrius 1
e.emote_ExclamationMark("Robin");
e.npcFaceDirection(robin, EventHelper.FacingDirection.Up);
e.speak(robin, GetTranslatedString("Event:DatingMaruBirthday_Robin:1")); //robin 1
e.npcFaceDirection(robin, EventHelper.FacingDirection.Down);
e.moveActorDown("Robin", 1, EventHelper.FacingDirection.Down, false);
e.addObject(27, 12, 220);
e.speak(maru, GetTranslatedString("Event:DatingMaruBirthday_Maru:2")); //maru 2
e.emoteFarmer_Thinking();
e.speak(sebastian, GetTranslatedString("Event:DatingMaruBirthday_Sebastian:1")); //Sebastian 1
e.speak(maru, GetTranslatedString("Event:DatingMaruBirthday_Maru:3")); //maru 3
//Event finish commands.
e.emoteFarmer_Heart();
e.emote_Heart("Maru");
e.globalFadeOut(0.010);
e.setViewportPosition(-100, -100);
e.showMessage(HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingMaruBirthday_Finish:0")); //maru party finish 0
e.showMessage(HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingMaruBirthday_Finish:1")); //maru party finish 0
e.addObjectToPlayersInventory(220, 1, false);
e.showMessage(HappyBirthday.Config.translationInfo.getTranslatedString("Event:PartyOver"));
e.end();
return e;
} }
/*
public static EventHelper DatingBirthday_Leah() public static EventHelper DatingBirthday_Leah()
{ {
@ -183,47 +252,117 @@ namespace Omegasis.HappyBirthday.Framework
{ {
} }
*/
/// <summary>
/// Event that occurs when the player is dating Sebastian.
/// Status: Finished.
/// </summary>
/// <returns></returns>
public static EventHelper DatingBirthday_Sebastian() public static EventHelper DatingBirthday_Sebastian()
{ {
List<EventPrecondition> conditions = new List<EventPrecondition>();
conditions.Add(new FarmerBirthdayPrecondition());
conditions.Add(new LocationPrecondition(Game1.getLocationFromName("ScienceHouse")));
conditions.Add(new TimePrecondition(600, 2600));
NPC maru = Game1.getCharacterFromName("Maru");
NPC sebastian = Game1.getCharacterFromName("Sebastian");
NPC robin = Game1.getCharacterFromName("Robin");
NPC demetrius = Game1.getCharacterFromName("Demetrius");
conditions.Add(new StardustCore.Events.Preconditions.NPCSpecific.DatingNPC(sebastian));
EventHelper e = new EventHelper("BirthdayDating:Sebastian", 19952, conditions, new EventStartData("playful", 28, 12, new EventStartData.FarmerData(23, 12, EventHelper.FacingDirection.Right), new List<EventStartData.NPCData>() {
new EventStartData.NPCData(maru,27,11, EventHelper.FacingDirection.Down),
new EventStartData.NPCData(sebastian,26,13, EventHelper.FacingDirection.Up),
new EventStartData.NPCData(robin,28,9, EventHelper.FacingDirection.Up),
new EventStartData.NPCData(demetrius,30,11, EventHelper.FacingDirection.Left)
}));
e.globalFadeIn();
e.moveFarmerRight(3, EventHelper.FacingDirection.Right, true);
e.npcFaceDirection(maru, EventHelper.FacingDirection.Left);
e.npcFaceDirection(demetrius, EventHelper.FacingDirection.Left);
//Seb is already facing up.
e.npcFaceDirection(robin, EventHelper.FacingDirection.Down);
//Dialogue goes here.
//Seriously improve dialogue lines. Maru is probably the NPC I know the least about.
e.speak(sebastian, GetTranslatedString("Event:DatingSebastianBirthday_Sebastian:0")); //sebastian 0
e.speak(robin, GetTranslatedString("Event:DatingSebastianBirthday_Robin:0")); //maru 0
e.speak(maru, GetTranslatedString("Event:DatingSebastianBirthday_Maru:0"));//Maru 0
e.speak(robin, GetTranslatedString("Event:DatingSebastianBirthday_Robin:1")); //robin 0
e.speak(demetrius, GetTranslatedString("Event:DatingSebastianBirthday_Demetrius:0")); //demetrius 0
e.speak(sebastian, GetTranslatedString("Event:DatingSebastianBirthday_Sebastian:1")); //Sebastian 1
e.emote_ExclamationMark("Robin");
e.npcFaceDirection(robin, EventHelper.FacingDirection.Up);
e.speak(robin, GetTranslatedString("Event:DatingSebastianBirthday_Robin:2")); //robin 1
e.npcFaceDirection(robin, EventHelper.FacingDirection.Down);
e.moveActorDown("Robin", 1, EventHelper.FacingDirection.Down, false);
e.addObject(27, 12, 220);
e.speak(demetrius, GetTranslatedString("Event:DatingSebastianBirthday_Demetrius:1")); //maru 2
e.emoteFarmer_Thinking();
e.speak(maru, GetTranslatedString("Event:DatingSebastianBirthday_Maru:1")); //maru 3
e.speak(sebastian, GetTranslatedString("Event:DatingSebastianBirthday_Sebastian:2")); //Sebastian 1
//Event finish commands.
e.emoteFarmer_Heart();
e.emote_Heart("Sebastian");
e.globalFadeOut(0.010);
e.setViewportPosition(-100, -100);
e.showMessage(HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingSebastianBirthday_Finish:0")); //maru party finish 0
e.showMessage(HappyBirthday.Config.translationInfo.getTranslatedString("Event:DatingSebastianBirthday_Finish:1")); //maru party finish 0
e.addObjectToPlayersInventory(220, 1, false);
e.showMessage(HappyBirthday.Config.translationInfo.getTranslatedString("Event:PartyOver"));
e.end();
return e;
} }
public static EventHelper DatingBirthday_Elliott()
/*
public static EventHelper DatingBirthday_Elliott()
{
}
public static EventHelper DatingBirthday_Shane()
{
}
public static EventHelper DatingBirthday_Harvey()
{
}
public static EventHelper DatingBirthday_Alex()
{
}
public static EventHelper Birthday_Krobus()
{
}
public static EventHelper MarriedBirthday_NoKids()
{
}
public static EventHelper MarriedBirthday_OneKids()
{
}
public static EventHelper MarriedBirthday_TwoKids()
{
}
*/
public static string GetTranslatedString(string Key)
{ {
return HappyBirthday.Config.translationInfo.getTranslatedString(Key);
}
public static EventHelper DatingBirthday_Shane()
{
}
public static EventHelper DatingBirthday_Harvey()
{
} }
public static EventHelper DatingBirthday_Alex()
{
}
public static EventHelper Birthday_Krobus()
{
}
public static EventHelper MarriedBirthday_NoKids()
{
}
public static EventHelper MarriedBirthday_OneKids()
{
}
public static EventHelper MarriedBirthday_TwoKids()
{
}
*/
}
} }
}

View File

@ -115,9 +115,16 @@ namespace Omegasis.HappyBirthday
if (e.NewLocation == Game1.getLocationFromName("Trailer")) if (e.NewLocation == Game1.getLocationFromName("Trailer"))
{ {
EventHelper eve = this.eventManager.getEvent("BirthdayDating:Penny"); EventHelper eve = this.eventManager.getEvent("BirthdayDating:Penny");
this.Monitor.Log(eve.getEventString(), LogLevel.Info);
eve.startEventAtLocationifPossible(); eve.startEventAtLocationifPossible();
} }
if (e.NewLocation == Game1.getLocationFromName("ScienceHouse"))
{
EventHelper eve = this.eventManager.getEvent("BirthdayDating:Maru");
eve.startEventAtLocationifPossible();
EventHelper eve2 = this.eventManager.getEvent("BirthdayDating:Sebastian");
eve2.startEventAtLocationifPossible();
}
} }
private void GameLoop_GameLaunched(object sender, GameLaunchedEventArgs e) private void GameLoop_GameLaunched(object sender, GameLaunchedEventArgs e)
@ -145,6 +152,8 @@ namespace Omegasis.HappyBirthday
data["birthdayDad"] = BirthdayMessages.GetTranslatedString("Mail:birthdayDad"); data["birthdayDad"] = BirthdayMessages.GetTranslatedString("Mail:birthdayDad");
data["birthdayJunimos"] = BirthdayMessages.GetTranslatedString("Mail:birthdayJunimos"); data["birthdayJunimos"] = BirthdayMessages.GetTranslatedString("Mail:birthdayJunimos");
data["birthdayDatingPenny"] = BirthdayMessages.GetTranslatedString("Mail:birthdayDatingPenny"); data["birthdayDatingPenny"] = BirthdayMessages.GetTranslatedString("Mail:birthdayDatingPenny");
data["birthdayDatingMaru"] = BirthdayMessages.GetTranslatedString("Mail:birthdayDatingMaru");
data["birthdayDatingSebastian"] = BirthdayMessages.GetTranslatedString("Mail:birthdayDatingSebastian");
} }
@ -574,12 +583,24 @@ namespace Omegasis.HappyBirthday
{ {
Game1.player.mailReceived.Remove("birthdayDatingPenny"); Game1.player.mailReceived.Remove("birthdayDatingPenny");
} }
if (Game1.player.mailReceived.Contains("birthdayDatingMaru"))
{
Game1.player.mailReceived.Remove("birthdayDatingMaru");
}
if (Game1.player.mailReceived.Contains("birthdayDatingSebastian"))
{
Game1.player.mailReceived.Remove("birthdayDatingSebastian");
}
EventHelper communityCenterJunimoBirthday = BirthdayEvents.CommunityCenterJunimoBirthday(); EventHelper communityCenterJunimoBirthday = BirthdayEvents.CommunityCenterJunimoBirthday();
EventHelper birthdayDating_Penny = BirthdayEvents.DatingBirthday_Penny(); EventHelper birthdayDating_Penny = BirthdayEvents.DatingBirthday_Penny();
EventHelper birthdayDating_Maru = BirthdayEvents.DatingBirthday_Maru();
EventHelper birthdayDating_Sebastian = BirthdayEvents.DatingBirthday_Sebastian();
this.eventManager.addEvent(communityCenterJunimoBirthday); this.eventManager.addEvent(communityCenterJunimoBirthday);
this.eventManager.addEvent(birthdayDating_Penny); this.eventManager.addEvent(birthdayDating_Penny);
this.eventManager.addEvent(birthdayDating_Maru);
this.eventManager.addEvent(birthdayDating_Sebastian);
if (Game1.player.eventsSeen.Contains(communityCenterJunimoBirthday.getEventID())) if (Game1.player.eventsSeen.Contains(communityCenterJunimoBirthday.getEventID()))
{ {
Game1.player.eventsSeen.Remove(communityCenterJunimoBirthday.getEventID()); //Repeat the event. Game1.player.eventsSeen.Remove(communityCenterJunimoBirthday.getEventID()); //Repeat the event.
@ -588,6 +609,14 @@ namespace Omegasis.HappyBirthday
{ {
Game1.player.eventsSeen.Remove(birthdayDating_Penny.getEventID()); //Repeat the event. Game1.player.eventsSeen.Remove(birthdayDating_Penny.getEventID()); //Repeat the event.
} }
if (Game1.player.eventsSeen.Contains(birthdayDating_Maru.getEventID()))
{
Game1.player.eventsSeen.Remove(birthdayDating_Maru.getEventID()); //Repeat the event.
}
if (Game1.player.eventsSeen.Contains(birthdayDating_Sebastian.getEventID()))
{
Game1.player.eventsSeen.Remove(birthdayDating_Sebastian.getEventID()); //Repeat the event.
}
} }
/// <summary>Raised before the game begins writes data to the save file (except the initial save creation).</summary> /// <summary>Raised before the game begins writes data to the save file (except the initial save creation).</summary>
@ -650,6 +679,23 @@ namespace Omegasis.HappyBirthday
} }
} }
if (Game1.player.friendshipData.ContainsKey("Maru"))
{
if (Game1.player.friendshipData["Maru"].IsDating())
{
Game1.player.mailbox.Add("birthdayDatingMaru");
}
}
if (Game1.player.friendshipData.ContainsKey("Sebastian"))
{
if (Game1.player.friendshipData["Sebastian"].IsDating())
{
Game1.player.mailbox.Add("birthdayDatingSebastian");
}
}
if (Game1.player.CanReadJunimo()) if (Game1.player.CanReadJunimo())
{ {
Game1.player.mailbox.Add("birthdayJunimos"); Game1.player.mailbox.Add("birthdayJunimos");
@ -809,11 +855,5 @@ namespace Omegasis.HappyBirthday
} }
} }
} }
private void hmm()
{
Game1.player.currentLocation.currentEvent = new Event();
}
} }
} }

View File

@ -140,31 +140,32 @@ namespace StardustCore.Events
/// </summary> /// </summary>
/// <param name="Dir"></param> /// <param name="Dir"></param>
/// <returns></returns> /// <returns></returns>
protected virtual int getFacingDirectionNumber(FacingDirection Dir) public virtual int getFacingDirectionNumber(FacingDirection Dir)
{ {
return (int)Dir; return (int)Dir;
} }
/// <summary> /// <summary>
/// Gets the layer string from the Layer enum. /// Gets the layer string from the Layer enum. Has weird values???/
/// </summary> /// </summary>
/// <param name="Layer"></param> /// <param name="Layer"></param>
/// <returns></returns> /// <returns></returns>
protected virtual string getLayerName(Layers Layer) public virtual int getLayerName(Layers Layer)
{ {
if (Layer == Layers.AlwaysFront) return "AlwaysFront"; return 724;
if (Layer == Layers.Back) return "Back"; //if (Layer == Layers.AlwaysFront) return "AlwaysFront";
if (Layer == Layers.Buildings) return "Buildings"; //if (Layer == Layers.Back) return "Back";
if (Layer == Layers.Front) return "Front"; //if (Layer == Layers.Buildings) return "Buildings";
if (Layer == Layers.Paths) return "Paths"; //if (Layer == Layers.Front) return "Front";
return ""; //if (Layer == Layers.Paths) return "Paths";
//return "";
} }
/// <summary> /// <summary>
/// Gets the even parsing seperator. /// Gets the even parsing seperator.
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
protected virtual string getSeperator() public virtual string getSeperator()
{ {
return "/"; return "/";
} }
@ -173,7 +174,7 @@ namespace StardustCore.Events
/// Gets the starting event numbers based off of my nexus user id. /// Gets the starting event numbers based off of my nexus user id.
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
protected virtual string getUniqueEventStartID() public virtual string getUniqueEventStartID()
{ {
string s = this.nexusUserId.ToString(); string s = this.nexusUserId.ToString();
return s.Substring(0, 4); return s.Substring(0, 4);
@ -192,7 +193,7 @@ namespace StardustCore.Events
/// </summary> /// </summary>
/// <param name="IDToCheck"></param> /// <param name="IDToCheck"></param>
/// <returns></returns> /// <returns></returns>
protected virtual bool isIdValid(int IDToCheck) public virtual bool isIdValid(int IDToCheck)
{ {
if (IDToCheck > 2147483647 || IDToCheck < 0) return false; if (IDToCheck > 2147483647 || IDToCheck < 0) return false;
else return true; else return true;
@ -203,7 +204,7 @@ namespace StardustCore.Events
/// </summary> /// </summary>
/// <param name="IDToCheck"></param> /// <param name="IDToCheck"></param>
/// <returns></returns> /// <returns></returns>
protected virtual bool isIdValid(string IDToCheck) public virtual bool isIdValid(string IDToCheck)
{ {
if (Convert.ToInt32(IDToCheck) > 2147483647 || Convert.ToInt32(IDToCheck) < 0) return false; if (Convert.ToInt32(IDToCheck) > 2147483647 || Convert.ToInt32(IDToCheck) < 0) return false;
else return true; else return true;
@ -221,7 +222,7 @@ namespace StardustCore.Events
/// </summary> /// </summary>
/// <param name="PlayerActor"></param> /// <param name="PlayerActor"></param>
/// <returns></returns> /// <returns></returns>
protected virtual StardewValley.Event getEvent(Farmer PlayerActor = null) public virtual StardewValley.Event getEvent(Farmer PlayerActor = null)
{ {
return new StardewValley.Event(this.getEventString(), Convert.ToInt32(this.getEventID()), PlayerActor); return new StardewValley.Event(this.getEventString(), Convert.ToInt32(this.getEventID()), PlayerActor);
} }
@ -267,7 +268,7 @@ namespace StardustCore.Events
/// <param name="xTile"></param> /// <param name="xTile"></param>
/// <param name="yTile"></param> /// <param name="yTile"></param>
/// <param name="ID"></param> /// <param name="ID"></param>
protected virtual void addBigProp(int xTile, int yTile, int ID) public virtual void addBigProp(int xTile, int yTile, int ID)
{ {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
b.Append("addBigProp "); b.Append("addBigProp ");
@ -283,7 +284,7 @@ namespace StardustCore.Events
/// Starts an active dialogue event with the given ID and a length of 4 days. /// Starts an active dialogue event with the given ID and a length of 4 days.
/// </summary> /// </summary>
/// <param name="ID"></param> /// <param name="ID"></param>
protected virtual void addConversationTopic(string ID) public virtual void addConversationTopic(string ID)
{ {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
b.Append("addBigProp "); b.Append("addBigProp ");
@ -295,7 +296,7 @@ namespace StardustCore.Events
/// Adds the specified cooking recipe to the player. /// Adds the specified cooking recipe to the player.
/// </summary> /// </summary>
/// <param name="Recipe"></param> /// <param name="Recipe"></param>
protected virtual void addCookingRecipe(string Recipe) public virtual void addCookingRecipe(string Recipe)
{ {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
b.Append("addCookingRecipe "); b.Append("addCookingRecipe ");
@ -307,7 +308,7 @@ namespace StardustCore.Events
/// Adds the specified crafting recipe to the player. /// Adds the specified crafting recipe to the player.
/// </summary> /// </summary>
/// <param name="Recipe"></param> /// <param name="Recipe"></param>
protected virtual void addCraftingRecipe(string Recipe) public virtual void addCraftingRecipe(string Recipe)
{ {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
b.Append("addCraftingRecipe "); b.Append("addCraftingRecipe ");
@ -318,7 +319,7 @@ namespace StardustCore.Events
/// <summary> /// <summary>
/// Add a non-solid prop from the current festival texture. Default solid width/height is 1. Default display height is solid height. /// Add a non-solid prop from the current festival texture. Default solid width/height is 1. Default display height is solid height.
/// </summary> /// </summary>
protected virtual void addFloorProp(int PropIndex, int XTile, int YTile, int SolidWidth, int SolidHeight, int DisplayHeight) public virtual void addFloorProp(int PropIndex, int XTile, int YTile, int SolidWidth, int SolidHeight, int DisplayHeight)
{ {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
b.Append("addFloorProp "); b.Append("addFloorProp ");
@ -343,7 +344,7 @@ namespace StardustCore.Events
/// <param name="XPosition"></param> /// <param name="XPosition"></param>
/// <param name="YPosition"></param> /// <param name="YPosition"></param>
/// <param name="LightRadius"></param> /// <param name="LightRadius"></param>
protected virtual void addLantern(int ItemID, int XPosition, int YPosition, float LightRadius) public virtual void addLantern(int ItemID, int XPosition, int YPosition, float LightRadius)
{ {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
b.Append("addLantern "); b.Append("addLantern ");
@ -361,7 +362,7 @@ namespace StardustCore.Events
/// Set a letter as received. /// Set a letter as received.
/// </summary> /// </summary>
/// <param name="ID"></param> /// <param name="ID"></param>
protected virtual void addMailReceived(string ID) public virtual void addMailReceived(string ID)
{ {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
b.Append("addMailReceived "); b.Append("addMailReceived ");
@ -376,7 +377,7 @@ namespace StardustCore.Events
/// <param name="YTile"></param> /// <param name="YTile"></param>
/// <param name="ParentSheetIndex"></param> /// <param name="ParentSheetIndex"></param>
/// <param name="Layer"></param> /// <param name="Layer"></param>
protected virtual void addObject(int XTile, int YTile, int ParentSheetIndex, string Layer) public virtual void addObject(int XTile, int YTile, int ParentSheetIndex)
{ {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
b.Append("addObject "); b.Append("addObject ");
@ -384,26 +385,7 @@ namespace StardustCore.Events
b.Append(" "); b.Append(" ");
b.Append(YTile.ToString()); b.Append(YTile.ToString());
b.Append(" "); b.Append(" ");
b.Append(Layer); b.Append(ParentSheetIndex);
this.add(b);
}
/// <summary>
/// Adds a temporary sprite at the specified tile from the Maps\springobjects.png sprite sheet.
/// </summary>
/// <param name="XTile"></param>
/// <param name="YTile"></param>
/// <param name="ParentSheetIndex"></param>
/// <param name="Layer"></param>
protected virtual void addObject(int XTile, int YTile, int ParentSheetIndex, Layers Layer)
{
StringBuilder b = new StringBuilder();
b.Append("addObject ");
b.Append(XTile.ToString());
b.Append(" ");
b.Append(YTile.ToString());
b.Append(" ");
b.Append(this.getLayerName(Layer));
this.add(b); this.add(b);
} }
@ -416,7 +398,7 @@ namespace StardustCore.Events
/// <param name="SolidWidth"></param> /// <param name="SolidWidth"></param>
/// <param name="SolidHeight"></param> /// <param name="SolidHeight"></param>
/// <param name="DisplayHeight"></param> /// <param name="DisplayHeight"></param>
protected virtual void addProp(int Index, int XTile, int YTile, int SolidWidth, int SolidHeight, int DisplayHeight) public virtual void addProp(int Index, int XTile, int YTile, int SolidWidth, int SolidHeight, int DisplayHeight)
{ {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
b.Append("addProp "); b.Append("addProp ");

View File

@ -38,7 +38,13 @@ namespace StardustCore.Events.Preconditions.NPCSpecific
public override bool meetsCondition() public override bool meetsCondition()
{ {
return Game1.player.friendshipData[this.npc.Name].IsDating(); if (Game1.player.friendshipData.ContainsKey(this.npc.Name)){
return Game1.player.friendshipData[this.npc.Name].IsDating();
}
else
{
return false;
}
} }
} }
} }