HUGE bug fix to Happy Birthday mod. Fixes many bugs from hardcoded strings, to no spouse messages, to cleaning up translation folder.
This commit is contained in:
parent
3d50d2e38a
commit
059b2d57be
|
@ -32,10 +32,10 @@ namespace Omegasis.HappyBirthday
|
|||
["Penny"] = "",
|
||||
};
|
||||
|
||||
public Dictionary<string, Func<string,string>> spouseEnglishGeneratedMessages = new Dictionary<string, Func<string,string>>();
|
||||
public Dictionary<string, Func<string, string>> spouseEnglishGeneratedMessages = new Dictionary<string, Func<string, string>>();
|
||||
|
||||
/// <summary>Used to contain birthday wishes should the mod not find any available.</summary>
|
||||
public Dictionary<string, string> defaultBirthdayWishes = new Dictionary<string, string>()
|
||||
/// <summary>Used to contain birthday wishes should the mod not find any available. These were written myself, Omegasis.</summary>
|
||||
public Dictionary<string, string> defaultBirthdayWishesLegacy = new Dictionary<string, string>()
|
||||
{
|
||||
["Robin"] = "Hey @, happy birthday! I'm glad you choose this town to move here to. ",
|
||||
["Demetrius"] = "Happy birthday @! Make sure you take some time off today to enjoy yourself. $h",
|
||||
|
@ -72,6 +72,46 @@ namespace Omegasis.HappyBirthday
|
|||
["Krobus"] = "I have heard that it is tradition to give a gift to others on their birthday. In that case, happy birthday @."
|
||||
};
|
||||
|
||||
/// <summary>Used to contain birthday wishes should the mod not find any available. These were written nexus mods user cerreli.</summary>
|
||||
public Dictionary<string, string> defaultBirthdayWishes = new Dictionary<string, string>()
|
||||
{
|
||||
|
||||
["Robin"] = "Hey, @, happy birthday! I'm really glad you decided to move to the valley. ",
|
||||
["Demetrius"] = "Happy birthday, @! Make sure you take some time off today to enjoy yourself. $h",
|
||||
["Maru"] = "Happy birthday, @. I tried to make an everlasting candle for you, but sadly that didn't work out. Maybe next year, right? $h",
|
||||
["Sebastian"] = "Happy birthday, @. Hope things are going well down at the farm.",
|
||||
["Linus"] = "Happy birthday, @. Thanks for visiting me even on your birthday. It makes me really happy. ",
|
||||
["Pierre"] = "Hey @, happy birthday! Hopefully this next year will be a great one for you! ",
|
||||
["Caroline"] = "Happy birthday, @. Thank you for all that you've done for our community. I'm sure your parents must be proud of you.$h",
|
||||
["Abigail"] = "Happy birthday, @! Hopefully this year we can go on even more adventures together $h!",
|
||||
["Alex"] = "Yo @, happy birthday! Here's to making this the best year yet!$h",
|
||||
["George"] = "When you get to my age, birthdays start to come and go. Still, happy birthday, @.",
|
||||
["Evelyn"] = "Happy birthday, @. You have grown into such a fine individual, and I'm sure your grandfather would be proud to see who you've become. ",
|
||||
["Lewis"] = "Happy birthday, @! I really appreciate everything you've done for the town. Keep up the good work.",
|
||||
["Clint"] = "Hey, happy birthday, @. I'm sure this year is going to be great for you.",
|
||||
["Penny"] = "Happy birthday, @. May you enjoy all of life's blessings this year. ",
|
||||
["Pam"] = "Happy birthday, kid. We should have a drink to celebrate another year of life for you! $h",
|
||||
["Emily"] = "Happy birthday, @! I can see your future shining bright.$h",
|
||||
["Haley"] = "Happy birthday, @. Hopefully this year you'll get some good presents!$h",
|
||||
["Jas"] = "Happy birthday, @. I'm glad I decided to get to know you.",
|
||||
["Vincent"] = "Hey, @, have you come to pl... oh, it's your birthday? Happy birthday! ",
|
||||
["Jodi"] = "Hello there, @. Rumor has it that today is your birthday. In that case, happy birthday!$h",
|
||||
["Kent"] = "Jodi told me that it was your birthday today, @. Happy birthday, and make sure to cherish every single day.",
|
||||
["Sam"] = "Hey @, happy birthday! We'll have to have a birthday jam session for you sometime!$h ",
|
||||
["Leah"] = "Hey @, happy birthday! I'm glad to see you're doing well on the farm.$h ",
|
||||
["Shane"] = "Happy birthday, @. Keep working hard, and I'm sure this next year will be a great one for you.",
|
||||
["Marnie"] = "Hi, @! Everyone is talking about your birthday today, and I wanted to make sure that I wished you a happy birthday as well. So, happy birthday! $h ",
|
||||
["Elliott"] = "What a wonderful day, isn't it, @? Though I'm sure it's even lovelier to you, it being your birthday!$h#$b#I was actually in the middle of writing a poem for the occasion, but a 'happy birthday' will have to suffice for now.",
|
||||
["Gus"] = "Hey, @, happy birthday! Hopefully you enjoy the rest of the day, and make sure you aren't a stranger at the saloon!",
|
||||
["Dwarf"] = "Happy birthday, @. Wait, humans celebrate those, right?",
|
||||
["Wizard"] = "Happy birthday, @. Never forget that you alone make your future.#$e#How did I know? Ah, I overheard a few of the locals conferring on what gifts to give you. I think you'll appreciate them.",
|
||||
["Harvey"] = "Happy birthday, @. Come in for a checkup sometime, alright? I want to make sure you'll see plenty more.",
|
||||
["Sandy"] = "Aww, sweetie, you came all the way out here to see me on your birthday?$h#$b#Well, then, the least I can do is wish you a happy one!~",
|
||||
["Willy"] = "Ahoy, @, happy birthday. Looking at you reminds me of the days when I was just a guppy myself. $bEnjoy yours while you can, young'un.$h",
|
||||
["Krobus"] = "Happy birthday, @. I still don't quite understand humans, but I'm glad to have met you all the same."
|
||||
|
||||
};
|
||||
|
||||
public BirthdayMessages()
|
||||
{
|
||||
this.spouseEnglishGeneratedMessages.Add("Alex", this.generateSpouseMessage);
|
||||
|
@ -93,79 +133,200 @@ namespace Omegasis.HappyBirthday
|
|||
|
||||
public Dictionary<StardewValley.LocalizedContentManager.LanguageCode, Dictionary<string, string>> translatedStrings = new Dictionary<StardewValley.LocalizedContentManager.LanguageCode, Dictionary<string, string>>()
|
||||
{
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.de] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = ""
|
||||
},
|
||||
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.en] = new Dictionary<string, string>()
|
||||
{
|
||||
["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 %%",
|
||||
["Happy Birthday: Star Message"] = "It's your birthday today! Happy birthday!",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "It's @'s birthday! Happy birthday to them!"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.es] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = ""
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "It's @'s birthday! Happy birthday to them!",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] ="Season",
|
||||
["Birthday"]="Birthday",
|
||||
["Date"]="Date"
|
||||
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.ja] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = ""
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.pt] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = ""
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.ru] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "ƒорогой @,^ — днем рождени¤, мо¤ радость. Ёто были замечательные моменты, когда ты выростал в доброго, трудолюбивого человека. я надеюсь, в твоей жизни будет куча превосходных моментов. ^ — любовью, мама ^ P.S. «десь находить небольшой подарок, который ¤ сделала дл¤ теб¤. %item object 221 1 %%",
|
||||
["Mail:birthdayDad"] = "ƒорогой @,^ — днем рождени¤, мой ребенок. «десь немного тихо в твой день рождени¤ с тех пор, как ты уехал на ферму, но тво¤ мать и ¤ знаем, что ты со своим дедушкой делаешь нас гордыми. ћы оба знаем, что жить на ферме может быть трудно, но мы верим в теб¤ на все 100%, просто продолжай следовать своим мечтам.^ — любовью папа ^ P.S. “ут есть немного денег, которые помогут тебе на ферме. ”дачи! %item money 5000 5001%%",
|
||||
["Happy Birthday: Star Message"] = "Ёто твой день рождени¤! — днем рождени¤!",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "Ёто твой день рождени¤! ѕоздравл¤ю с этим!"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.th] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = ""
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "Ёто твой день рождени¤! ѕоздравл¤ю с этим!",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.zh] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "亲爱的@,^ 生日快乐宝贝。看着你成长成为一个善良努力的人,就如我一直梦想着你成为的样子,我感到十分欣喜。我希望你能继续跟你爱的人制造更多美好的回忆。 ^ 爱你的,妈妈 ^ 附言:这是我给你做的一点小礼物。 %item object 221 1 %%",
|
||||
["Mail:birthdayDad"] = "亲爱的@,^ 生日快乐孩子。你生日的这天没有你,我们这儿还挺寂寞的,但我和你妈妈都知道你让我们和你爷爷感到骄傲。我们知道你一个人生活可能会很艰难,但我们百分百相信你能做到,所以继续追求你的梦想吧。^ 爱你的,爸爸 ^ 附言:这是能在农场上帮到你的一些零用钱。祝你好运! %item money 5000 5001 %%",
|
||||
["Happy Birthday: Star Message"] = "今天是你的生日!生日快乐!",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = ""
|
||||
}
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.pt] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.es] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.de] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.th] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.fr] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.ko] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.it] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.tr] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
[StardewValley.LocalizedContentManager.LanguageCode.hu] = new Dictionary<string, string>()
|
||||
{
|
||||
["Mail:birthdayMom"] = "",
|
||||
["Mail:birthdayDad"] = "",
|
||||
["Happy Birthday: Star Message"] = "",
|
||||
["Happy Birthday: Farmhand Birthday Message"] = "",
|
||||
["Spring"] = "Spring",
|
||||
["Summer"] = "Summer",
|
||||
["Fall"] = "Fall",
|
||||
["Winter"] = "Winter",
|
||||
["Season"] = "Season",
|
||||
["Birthday"] = "Birthday",
|
||||
["Date"] = "Date"
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>Used to load all of the default birthday greetings.</summary>
|
||||
public void createBirthdayGreetings()
|
||||
{
|
||||
var serializer = JsonSerializer.Create();
|
||||
serializer.Formatting = Formatting.Indented;
|
||||
|
||||
//English logic.
|
||||
string defaultPath = Path.Combine(HappyBirthday.ModHelper.DirectoryPath, "Content", "Dialogue", HappyBirthday.Config.translationInfo.getFileExtentionForDirectory(HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
if (!Directory.Exists(defaultPath)) Directory.CreateDirectory(defaultPath);
|
||||
|
||||
string birthdayFileDict = HappyBirthday.Config.translationInfo.getJSONForTranslation("BirthdayWishes", HappyBirthday.Config.translationInfo.CurrentTranslation);
|
||||
string path = Path.Combine("Content", "Dialogue", HappyBirthday.Config.translationInfo.getFileExtentionForDirectory(HappyBirthday.Config.translationInfo.CurrentTranslation), birthdayFileDict);
|
||||
string path = Path.Combine("Content", "Dialogue", HappyBirthday.Config.translationInfo.getFileExtentionForDirectory(Framework.TranslationInfo.LanguageName.English), birthdayFileDict);
|
||||
|
||||
//Handle normal birthday wishes.
|
||||
if (!File.Exists(Path.Combine(HappyBirthday.ModHelper.DirectoryPath, path)))
|
||||
|
@ -197,7 +358,10 @@ namespace Omegasis.HappyBirthday
|
|||
|
||||
string basePath = Path.Combine(HappyBirthday.ModHelper.DirectoryPath, "Content", "Dialogue", HappyBirthday.Config.translationInfo.getFileExtentionForDirectory(translation.Key));
|
||||
if (!Directory.Exists(basePath))
|
||||
{
|
||||
Directory.CreateDirectory(basePath);
|
||||
HappyBirthday.ModMonitor.Log("Create dir1: " + basePath, LogLevel.Info);
|
||||
}
|
||||
string tempBirthdayFile = Path.Combine("Content", "Dialogue", HappyBirthday.Config.translationInfo.getFileExtentionForDirectory(translation.Key), HappyBirthday.Config.translationInfo.getJSONForTranslation("BirthdayWishes", translation.Key));
|
||||
string tempSpouseBirthdayFile = Path.Combine("Content", "Dialogue", HappyBirthday.Config.translationInfo.getFileExtentionForDirectory(translation.Key), HappyBirthday.Config.translationInfo.getJSONForTranslation("SpouseBirthdayWishes", translation.Key));
|
||||
|
||||
|
@ -236,7 +400,7 @@ namespace Omegasis.HappyBirthday
|
|||
public static string GetTranslatedString(string key)
|
||||
{
|
||||
StardewValley.LocalizedContentManager.LanguageCode code = HappyBirthday.Config.translationInfo.TranslationCodes[HappyBirthday.Config.translationInfo.CurrentTranslation];
|
||||
string value= HappyBirthday.Instance.messages.translatedStrings[code][key];
|
||||
string value = HappyBirthday.Instance.messages.translatedStrings[code][key];
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
return GetEnglishMessageString(key);
|
||||
|
@ -260,8 +424,6 @@ namespace Omegasis.HappyBirthday
|
|||
StardewValley.LocalizedContentManager.LanguageCode code = translation.Value;
|
||||
|
||||
string basePath = Path.Combine(HappyBirthday.ModHelper.DirectoryPath, "Content", "Dialogue", HappyBirthday.Config.translationInfo.getFileExtentionForDirectory(translation.Key));
|
||||
if (!Directory.Exists(basePath))
|
||||
Directory.CreateDirectory(basePath);
|
||||
string stringsFile = Path.Combine("Content", "Dialogue", HappyBirthday.Config.translationInfo.getFileExtentionForDirectory(translation.Key), HappyBirthday.Config.translationInfo.getJSONForTranslation("TranslatedStrings", translation.Key));
|
||||
|
||||
|
||||
|
@ -275,35 +437,49 @@ namespace Omegasis.HappyBirthday
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads some strings from the StringsFromCS file for affectionate spouse words.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string getAffectionateSpouseWord()
|
||||
{
|
||||
|
||||
List<string> words = new List<string>();
|
||||
string dict = Path.Combine("Strings", "StringsFromCSFiles");
|
||||
if (Game1.player.IsMale)
|
||||
{
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4507", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4509", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4511", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4514", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4515", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4507", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4509", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4511", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4514", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4515", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4512", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4513", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4512", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4513", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
|
||||
}
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4508", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4510", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4516", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4517", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4518", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4519", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4522", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile("StringsFromCSFiles", "NPC.cs.4523", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
return words[Game1.random.Next(0, words.Count - 1)];
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4508", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4510", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4516", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4517", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4518", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4519", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4522", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
words.Add(HappyBirthday.Config.translationInfo.LoadStringFromXNBFile(dict, "NPC.cs.4523", HappyBirthday.Config.translationInfo.CurrentTranslation));
|
||||
|
||||
if (HappyBirthday.Config.translationInfo.CurrentTranslation == Framework.TranslationInfo.LanguageName.English)
|
||||
{
|
||||
words.Add("Pumpkin"); //Because this is cute.
|
||||
}
|
||||
|
||||
string s = words[Game1.random.Next(0, words.Count - 1)];
|
||||
|
||||
return s.ToLowerInvariant();
|
||||
}
|
||||
|
||||
public string getTimeOfDayString()
|
||||
|
@ -319,10 +495,14 @@ namespace Omegasis.HappyBirthday
|
|||
else return "evening";
|
||||
}
|
||||
|
||||
|
||||
public void generateSpouseBirthdayDialogue(string SpeakerName)
|
||||
/// <summary>
|
||||
/// Gets the actual birthday message.
|
||||
/// </summary>
|
||||
/// <param name="SpeakerName"></param>
|
||||
/// <returns></returns>
|
||||
public string generateSpouseBirthdayDialogue(string SpeakerName)
|
||||
{
|
||||
this.spouseEnglishGeneratedMessages[SpeakerName].Invoke(SpeakerName);
|
||||
return this.spouseEnglishGeneratedMessages[SpeakerName].Invoke(SpeakerName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -339,69 +519,108 @@ namespace Omegasis.HappyBirthday
|
|||
b.Append("Hey ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append(".");
|
||||
b.Append("I'm so glad that I married you. You make every day feel like winning a sports match. Happy birthday! $h");
|
||||
b.Append("I'm so glad that I married you. You make every day feel like winning a sports match. Happy birthday! $l");
|
||||
|
||||
break;
|
||||
case ("Elliott"):
|
||||
b.Append("Good ");
|
||||
b.Append(this.getTimeOfDayString());
|
||||
b.Append(" ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append(".");
|
||||
b.Append("I was just thinking on how you have been a muse for my work. You inspire me every day I spend with you. Happy birthday! $h");
|
||||
b.Append("I was just thinking on how you have been a muse for my work. You inspire me every day I spend with you. Happy birthday! $l");
|
||||
|
||||
break;
|
||||
case ("Harvey"):
|
||||
b.Append("Good ");
|
||||
b.Append(this.getTimeOfDayString());
|
||||
b.Append(" ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append(".");
|
||||
b.Append("I was just thinking on how invigorated I've felt since marrying you. When I look at you I feel as I'm positively glowing with joy. Happy birthday! $h");
|
||||
b.Append("I was just thinking on how invigorated I've felt since marrying you. When I look at you I feel as I'm positively glowing with joy. Happy birthday! $l");
|
||||
|
||||
break;
|
||||
case ("Sam"):
|
||||
b.Append("Good ");
|
||||
b.Append(this.getTimeOfDayString());
|
||||
b.Append(" ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append(".");
|
||||
b.Append("You know I never saw myself settling down before I met you, but now that I have I feel like I never want to look back. Happy birthday! $h");
|
||||
b.Append("You know I never saw myself settling down before I met you, but now that I have I feel like I never want to look back. Happy birthday! $l");
|
||||
|
||||
break;
|
||||
case ("Sebastian"):
|
||||
b.Append("I was never a big celebrater of birthdays but with you, today is special. Happy birthday");
|
||||
b.Append("I was never a big celebrater of birthdays but with you, today is special. Happy birthday ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append("$h");
|
||||
b.Append(".");
|
||||
b.Append("$l");
|
||||
|
||||
break;
|
||||
case ("Shane"):
|
||||
|
||||
b.Append("I never though I'd enjoy annything but drinking on birthdays but you have shown me how to live a great life. Happy birthday ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append(".");
|
||||
b.Append("$l");
|
||||
|
||||
break;
|
||||
case ("Abigail"):
|
||||
|
||||
|
||||
b.Append("Hey ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append(".");
|
||||
b.Append("You know every day feels like a great adventure with you! Happy birthday!");
|
||||
b.Append("$l");
|
||||
break;
|
||||
case ("Emily"):
|
||||
|
||||
case ("Emily"):
|
||||
b.Append("You know whenever I tried to read my fortune I never thought that I'd be as happy as I am with you! Happy birthday ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append("!");
|
||||
b.Append("$l");
|
||||
|
||||
break;
|
||||
case ("Haley"):
|
||||
|
||||
b.Append("You know ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append(", ");
|
||||
b.Append("we have come a long way since we first met but I'm glad we took this journey together. Every day feels picture perfect with you. Happy birthday!");
|
||||
b.Append("$l");
|
||||
|
||||
break;
|
||||
case ("Leah"):
|
||||
|
||||
b.Append("Hey, ");
|
||||
b.Append(this.getTimeOfDayString());
|
||||
b.Append(" ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append(".");
|
||||
b.Append("If it wasn't for you who knows what I would be doing right now. I might sculpt wood, but being with you has helped scult my life.");
|
||||
b.Append("Happy birthday!");
|
||||
b.Append("$l");
|
||||
|
||||
break;
|
||||
case ("Maru"):
|
||||
|
||||
|
||||
b.Append("Happy birthday");
|
||||
b.Append(" ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append(".");
|
||||
b.Append("I always thought I had to look into space to find a shooting star but when I look at you I realize I already have one.");
|
||||
b.Append("$l");
|
||||
break;
|
||||
case ("Penny"):
|
||||
|
||||
|
||||
b.Append("Happy birthday");
|
||||
b.Append(" ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append(". ");
|
||||
b.Append("I always read about happy endings in books but being with you makes me realize that it continues well into the future. Here is to many more years to come.");
|
||||
b.Append("$l");
|
||||
break;
|
||||
default:
|
||||
b.Append("Good ");
|
||||
b.Append(this.getTimeOfDayString());
|
||||
b.Append(" ");
|
||||
b.Append(this.getAffectionateSpouseWord());
|
||||
b.Append(".");
|
||||
b.Append("I hope we get to spend many more years together. Happy birthday.");
|
||||
b.Append("$h");
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"Robin": "嘿,@,生日快乐!我很高兴你选择搬到这里来。",
|
||||
"Demetrius": "生日快乐@!记得偶尔要抽出时间来好好享受一下。$h",
|
||||
"Maru": "生日快乐@。我本来想给我做个永恒不灭的蜡烛,但是好像行不通。也许明年再给你吧?$h",
|
||||
"Sebastian": "生日快乐@。又是平静的一年。",
|
||||
"Linus": "生日快乐@。谢谢你在你生日的这天依旧来看我。这让我很开心。",
|
||||
"Pierre": "嘿@,生日快乐!希望你的下一年会更好!",
|
||||
"Caroline": "生日快乐@。谢谢你为这个社区做的一切。我相信你的父母一定都很为你骄傲。$h",
|
||||
"Abigail": "生日快乐@!希望之后的一年我们可以一起去更多的地方冒险!$h",
|
||||
"Alex": "哟@,生日快乐!也许这会是你有生以来最棒的一年。$h",
|
||||
"George": "等你到我的年纪,生日就像其他的日子一样来去匆匆。不过还是祝你生日快乐,@。",
|
||||
"Evelyn": "生日快乐@。你成长成为了一个优秀的人,我相信你还会继续成长的。",
|
||||
"Lewis": "生日快乐@!我很感激你为这个小镇做的一切,我相信你爷爷也会为你骄傲的。",
|
||||
"Clint": "嘿生日快乐@。我相信接下来对你来说会是很棒的一年。",
|
||||
"Penny": "生日快乐@。希望你这一年都能得到所有的祝福。",
|
||||
"Pam": "生日快乐孩子。我们应该一起去喝一杯,庆祝你生命的又一年。",
|
||||
"Emily": "我今天感受到了很多关于你的正能量,所以一定是你的生日到了。生日快乐@!$h",
|
||||
"Haley": "生日快乐@。希望你今年能收到些很棒的礼物!$h",
|
||||
"Jas": "生日快乐@。希望你过个愉快的生日。",
|
||||
"Vincent": "嘿@,你是来玩的……哦今天是你的生日?生日快乐!",
|
||||
"Jodi": "你好啊@。听说今天是你的生日。既然如此,祝你生日快乐!$h",
|
||||
"Kent": "乔迪告诉我今天是你的生日,@。生日快乐,记得要珍惜每一天。",
|
||||
"Sam": "哟@,生日快乐!有机会我们来给你办个生日派对吧!$h",
|
||||
"Leah": "嘿@,生日快乐!我们今晚去酒吧庆祝一下吧!$h",
|
||||
"Shane": "生日快乐@。继续努力工作,我相信你接下来的这一年会更好。",
|
||||
"Marnie": "你好@。今天大家都在谈论你的生日,我也想跟你说一声生日快乐,那么,生日快乐!$h",
|
||||
"Elliott": "真是美好的一天不是吗,@?尤其今天是你的生日。我本想给你写一首诗,但我觉得简单的才是最好的,生日快乐。$h",
|
||||
"Gus": "嘿@,生日快乐!希望你今天过得愉快,酒吧永远都欢迎你!",
|
||||
"Dwarf": "生日快乐@。我希望我给你的东西是人类可以接受的。",
|
||||
"Wizard": "有精灵告诉我今天是你的生日。这么说,生日快乐@。希望你下一年辉煌灿烂!",
|
||||
"Harvey": "嘿@,生日快乐!有空记得到我这来做检查,这能让你多活很多年!",
|
||||
"Sandy": "你好啊@。我听说今天是你的生日,我可不想让你觉得被冷落了。生日快乐!",
|
||||
"Willy": "哎@,生日快乐。看到你让我想起了我曾经一个人漂在海上的日子。继续享受青春吧年轻人。$h",
|
||||
"Krobus": "我听说在别人生日的时候送一份礼物是传统。那么,生日快乐@。"
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"Robin": "Hey @, happy birthday! I'm glad you choose this town to move here to. ",
|
||||
"Demetrius": "Happy birthday @! Make sure you take some time off today to enjoy yourself. $h",
|
||||
"Maru": "Happy birthday @. I tried to make you an everlasting candle for you, but sadly that didn't work out. Maybe next year right? $h",
|
||||
"Sebastian": "Happy birthday @. Here's to another year of chilling. ",
|
||||
"Linus": "Happy birthday @. Thanks for visiting me even on your birthday. It makes me really happy. ",
|
||||
"Pierre": "Hey @, happy birthday! Hopefully this next year for you will be a great one! ",
|
||||
"Caroline": "Happy birthday @. Thank you for all that you've done for our community. I'm sure your parents must be proud of you.$h",
|
||||
"Abigail": "Happy birthday @! Hopefully this year we can go on even more adventures together $h!",
|
||||
"Alex": "Yo @, happy birthday! Maybe this will be your best year yet.$h",
|
||||
"George": "When you get to my age birthdays come and go. Still happy birthday @.",
|
||||
"Evelyn": "Happy birthday @. You have grown up to be such a fine individual and I'm sure you'll continue to grow. ",
|
||||
"Lewis": "Happy birthday @! I'm thankful for what you have done for the town and I'm sure your grandfather would be proud of you.",
|
||||
"Clint": "Hey happy birthday @. I'm sure this year is going to be great for you.",
|
||||
"Penny": "Happy birthday @. May you enjoy all of life's blessings this year. ",
|
||||
"Pam": "Happy birthday kid. We should have a drink to celebrate another year of life for you! $h",
|
||||
"Emily": "I'm sensing a strong positive life energy about you, so it must be your birthday. Happy birthday @!$h",
|
||||
"Haley": "Happy birthday @. Hopefully this year you'll get some good presents!$h",
|
||||
"Jas": "Happy birthday @. I hope you have a good birthday.",
|
||||
"Vincent": "Hey @ have you come to pl...oh it's your birthday? Happy birthday! ",
|
||||
"Jodi": "Hello there @. Rumor has it that today is your birthday. In that case, happy birthday!$h",
|
||||
"Kent": "Jodi told me that it was your birthday today @. Happy birthday and make sure to cherish every single day.",
|
||||
"Sam": "Yo @ happy birthday! We'll have to have a birthday jam session for you some time!$h ",
|
||||
"Leah": "Hey @ happy birthday! We should go to the saloon tonight and celebrate!$h ",
|
||||
"Shane": "Happy birthday @. Keep working hard and I'm sure this next year for you will be a great one.",
|
||||
"Marnie": "Hello there @. Everyone is talking about your birthday today and I wanted to make sure that I wished you a happy birthday as well, so happy birthday! $h ",
|
||||
"Elliott": "What a wonderful day isn't it @? Especially since today is your birthday. I tried to make you a poem but I feel like the best way of putting it is simply, happy birthday. $h ",
|
||||
"Gus": "Hey @ happy birthday! Hopefully you enjoy the rest of the day and make sure you aren't a stranger at the saloon!",
|
||||
"Dwarf": "Happy birthday @. I hope that what I got you is acceptable for humans as well. ",
|
||||
"Wizard": "The spirits told me that today is your birthday. In that case happy birthday @. May your year shine bright! ",
|
||||
"Harvey": "Hey @, happy birthday! Make sure to come in for a checkup some time to make sure you live many more years! ",
|
||||
"Sandy": "Hello there @. I heard that today was your birthday and I didn't want you feeling left out, so happy birthday!",
|
||||
"Willy": "Aye @ happy birthday. Looking at you reminds me of ye days when I was just a guppy swimming out to sea. Continue to enjoy them youngin.$h",
|
||||
"Krobus": "I have heard that it is tradition to give a gift to others on their birthday. In that case, happy birthday @."
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"Robin": "Hey, @, happy birthday! I'm really glad you decided to move to the valley. ",
|
||||
"Demetrius": "Happy birthday, @! Make sure you take some time off today to enjoy yourself. $h",
|
||||
"Maru": "Happy birthday, @. I tried to make an everlasting candle for you, but sadly that didn't work out. Maybe next year, right? $h",
|
||||
"Sebastian": "Happy birthday, @. Hope things are going well down at the farm.",
|
||||
"Linus": "Happy birthday, @. Thanks for visiting me even on your birthday. It makes me really happy. ",
|
||||
"Pierre": "Hey @, happy birthday! Hopefully this next year will be a great one for you! ",
|
||||
"Caroline": "Happy birthday, @. Thank you for all that you've done for our community. I'm sure your parents must be proud of you.$h",
|
||||
"Abigail": "Happy birthday, @! Hopefully this year we can go on even more adventures together $h!",
|
||||
"Alex": "Yo @, happy birthday! Here's to making this the best year yet!$h",
|
||||
"George": "When you get to my age, birthdays start to come and go. Still, happy birthday, @.",
|
||||
"Evelyn": "Happy birthday, @. You have grown into such a fine individual, and I'm sure your grandfather would be proud to see who you've become. ",
|
||||
"Lewis": "Happy birthday, @! I really appreciate everything you've done for the town. Keep up the good work.",
|
||||
"Clint": "Hey, happy birthday, @. I'm sure this year is going to be great for you.",
|
||||
"Penny": "Happy birthday, @. May you enjoy all of life's blessings this year. ",
|
||||
"Pam": "Happy birthday, kid. We should have a drink to celebrate another year of life for you! $h",
|
||||
"Emily": "Happy birthday, @! I can see your future shining bright.$h",
|
||||
"Haley": "Happy birthday, @. Hopefully this year you'll get some good presents!$h",
|
||||
"Jas": "Happy birthday, @. I'm glad I decided to get to know you.",
|
||||
"Vincent": "Hey, @, have you come to pl... oh, it's your birthday? Happy birthday! ",
|
||||
"Jodi": "Hello there, @. Rumor has it that today is your birthday. In that case, happy birthday!$h",
|
||||
"Kent": "Jodi told me that it was your birthday today, @. Happy birthday, and make sure to cherish every single day.",
|
||||
"Sam": "Hey @, happy birthday! We'll have to have a birthday jam session for you sometime!$h ",
|
||||
"Leah": "Hey @, happy birthday! I'm glad to see you're doing well on the farm.$h ",
|
||||
"Shane": "Happy birthday, @. Keep working hard, and I'm sure this next year will be a great one for you.",
|
||||
"Marnie": "Hi, @! Everyone is talking about your birthday today, and I wanted to make sure that I wished you a happy birthday as well. So, happy birthday! $h ",
|
||||
"Elliott": "What a wonderful day, isn't it, @? Though I'm sure it's even lovelier to you, it being your birthday!$h#$b#I was actually in the middle of writing a poem for the occasion, but a 'happy birthday' will have to suffice for now.",
|
||||
"Gus": "Hey, @, happy birthday! Hopefully you enjoy the rest of the day, and make sure you aren't a stranger at the saloon!",
|
||||
"Dwarf": "Happy birthday, @. Wait, humans celebrate those, right?",
|
||||
"Wizard": "Happy birthday, @. Never forget that you alone make your future.#$e#How did I know? Ah, I overheard a few of the locals conferring on what gifts to give you. I think you'll appreciate them.",
|
||||
"Harvey": "Happy birthday, @. Come in for a checkup sometime, alright? I want to make sure you'll see plenty more.",
|
||||
"Sandy": "Aww, sweetie, you came all the way out here to see me on your birthday?$h#$b#Well, then, the least I can do is wish you a happy one!~",
|
||||
"Willy": "Ahoy, @, happy birthday. Looking at you reminds me of the days when I was just a guppy myself. $bEnjoy yours while you can, young'un.$h",
|
||||
"Krobus": "Happy birthday, @. I still don't quite understand humans, but I'm glad to have met you all the same."
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"Robin": "",
|
||||
"Demetrius": "",
|
||||
"Maru": "",
|
||||
"Sebastian": "",
|
||||
"Linus": "",
|
||||
"Pierre": "",
|
||||
"Caroline": "",
|
||||
"Abigail": "",
|
||||
"Alex": "",
|
||||
"George": "",
|
||||
"Evelyn": "",
|
||||
"Lewis": "",
|
||||
"Clint": "",
|
||||
"Penny": "",
|
||||
"Pam": "",
|
||||
"Emily": "",
|
||||
"Haley": "",
|
||||
"Jas": "",
|
||||
"Vincent": "",
|
||||
"Jodi": "",
|
||||
"Kent": "",
|
||||
"Sam": "",
|
||||
"Leah": "",
|
||||
"Shane": "",
|
||||
"Marnie": "",
|
||||
"Elliott": "",
|
||||
"Gus": "",
|
||||
"Dwarf": "",
|
||||
"Wizard": "",
|
||||
"Harvey": "",
|
||||
"Sandy": "",
|
||||
"Willy": "",
|
||||
"Krobus": ""
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Mail:birthdayMom": "",
|
||||
"Mail:birthdayDad": "",
|
||||
"Happy Birthday: Star Message": "",
|
||||
"Happy Birthday: Farmhand Birthday Message": ""
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"Robin": "",
|
||||
"Demetrius": "",
|
||||
"Maru": "",
|
||||
"Sebastian": "",
|
||||
"Linus": "",
|
||||
"Pierre": "",
|
||||
"Caroline": "",
|
||||
"Abigail": "",
|
||||
"Alex": "",
|
||||
"George": "",
|
||||
"Evelyn": "",
|
||||
"Lewis": "",
|
||||
"Clint": "",
|
||||
"Penny": "",
|
||||
"Pam": "",
|
||||
"Emily": "",
|
||||
"Haley": "",
|
||||
"Jas": "",
|
||||
"Vincent": "",
|
||||
"Jodi": "",
|
||||
"Kent": "",
|
||||
"Sam": "",
|
||||
"Leah": "",
|
||||
"Shane": "",
|
||||
"Marnie": "",
|
||||
"Elliott": "",
|
||||
"Gus": "",
|
||||
"Dwarf": "",
|
||||
"Wizard": "",
|
||||
"Harvey": "",
|
||||
"Sandy": "",
|
||||
"Willy": "",
|
||||
"Krobus": ""
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"Alex": "",
|
||||
"Elliott": "",
|
||||
"Harvey": "",
|
||||
"Sam": "",
|
||||
"Sebastian": "",
|
||||
"Shane": "",
|
||||
"Abigail": "",
|
||||
"Emily": "",
|
||||
"Haley": "",
|
||||
"Leah": "",
|
||||
"Maru": "",
|
||||
"Penny": ""
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Mail:birthdayMom": "",
|
||||
"Mail:birthdayDad": "",
|
||||
"Happy Birthday: Star Message": "",
|
||||
"Happy Birthday: Farmhand Birthday Message": ""
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"Robin": "",
|
||||
"Demetrius": "",
|
||||
"Maru": "",
|
||||
"Sebastian": "",
|
||||
"Linus": "",
|
||||
"Pierre": "",
|
||||
"Caroline": "",
|
||||
"Abigail": "",
|
||||
"Alex": "",
|
||||
"George": "",
|
||||
"Evelyn": "",
|
||||
"Lewis": "",
|
||||
"Clint": "",
|
||||
"Penny": "",
|
||||
"Pam": "",
|
||||
"Emily": "",
|
||||
"Haley": "",
|
||||
"Jas": "",
|
||||
"Vincent": "",
|
||||
"Jodi": "",
|
||||
"Kent": "",
|
||||
"Sam": "",
|
||||
"Leah": "",
|
||||
"Shane": "",
|
||||
"Marnie": "",
|
||||
"Elliott": "",
|
||||
"Gus": "",
|
||||
"Dwarf": "",
|
||||
"Wizard": "",
|
||||
"Harvey": "",
|
||||
"Sandy": "",
|
||||
"Willy": "",
|
||||
"Krobus": ""
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"Alex": "",
|
||||
"Elliott": "",
|
||||
"Harvey": "",
|
||||
"Sam": "",
|
||||
"Sebastian": "",
|
||||
"Shane": "",
|
||||
"Abigail": "",
|
||||
"Emily": "",
|
||||
"Haley": "",
|
||||
"Leah": "",
|
||||
"Maru": "",
|
||||
"Penny": ""
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Mail:birthdayMom": "",
|
||||
"Mail:birthdayDad": "",
|
||||
"Happy Birthday: Star Message": "",
|
||||
"Happy Birthday: Farmhand Birthday Message": ""
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"Robin": "",
|
||||
"Demetrius": "",
|
||||
"Maru": "",
|
||||
"Sebastian": "",
|
||||
"Linus": "",
|
||||
"Pierre": "",
|
||||
"Caroline": "",
|
||||
"Abigail": "",
|
||||
"Alex": "",
|
||||
"George": "",
|
||||
"Evelyn": "",
|
||||
"Lewis": "",
|
||||
"Clint": "",
|
||||
"Penny": "",
|
||||
"Pam": "",
|
||||
"Emily": "",
|
||||
"Haley": "",
|
||||
"Jas": "",
|
||||
"Vincent": "",
|
||||
"Jodi": "",
|
||||
"Kent": "",
|
||||
"Sam": "",
|
||||
"Leah": "",
|
||||
"Shane": "",
|
||||
"Marnie": "",
|
||||
"Elliott": "",
|
||||
"Gus": "",
|
||||
"Dwarf": "",
|
||||
"Wizard": "",
|
||||
"Harvey": "",
|
||||
"Sandy": "",
|
||||
"Willy": "",
|
||||
"Krobus": ""
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"Alex": "",
|
||||
"Elliott": "",
|
||||
"Harvey": "",
|
||||
"Sam": "",
|
||||
"Sebastian": "",
|
||||
"Shane": "",
|
||||
"Abigail": "",
|
||||
"Emily": "",
|
||||
"Haley": "",
|
||||
"Leah": "",
|
||||
"Maru": "",
|
||||
"Penny": ""
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Mail:birthdayMom": "ƒорогой @,^ — днем рождени¤, мо¤ радость. Ёто были замечательные моменты, когда ты выростал в доброго, трудолюбивого человека. я надеюсь, в твоей жизни будет куча превосходных моментов. ^ — любовью, мама ^ P.S. «десь находить небольшой подарок, который ¤ сделала дл¤ теб¤. %item object 221 1 %%",
|
||||
"Mail:birthdayDad": "ƒорогой @,^ — днем рождени¤, мой ребенок. «десь немного тихо в твой день рождени¤ с тех пор, как ты уехал на ферму, но тво¤ мать и ¤ знаем, что ты со своим дедушкой делаешь нас гордыми. ћы оба знаем, что жить на ферме может быть трудно, но мы верим в теб¤ на все 100%, просто продолжай следовать своим мечтам.^ — любовью папа ^ P.S. “ут есть немного денег, которые помогут тебе на ферме. ”дачи! %item money 5000 5001%%",
|
||||
"Happy Birthday: Star Message": "Ёто твой день рождени¤! — днем рождени¤!",
|
||||
"Happy Birthday: Farmhand Birthday Message": "Ёто твой день рождени¤! ѕоздравл¤ю с этим!"
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"Robin": "",
|
||||
"Demetrius": "",
|
||||
"Maru": "",
|
||||
"Sebastian": "",
|
||||
"Linus": "",
|
||||
"Pierre": "",
|
||||
"Caroline": "",
|
||||
"Abigail": "",
|
||||
"Alex": "",
|
||||
"George": "",
|
||||
"Evelyn": "",
|
||||
"Lewis": "",
|
||||
"Clint": "",
|
||||
"Penny": "",
|
||||
"Pam": "",
|
||||
"Emily": "",
|
||||
"Haley": "",
|
||||
"Jas": "",
|
||||
"Vincent": "",
|
||||
"Jodi": "",
|
||||
"Kent": "",
|
||||
"Sam": "",
|
||||
"Leah": "",
|
||||
"Shane": "",
|
||||
"Marnie": "",
|
||||
"Elliott": "",
|
||||
"Gus": "",
|
||||
"Dwarf": "",
|
||||
"Wizard": "",
|
||||
"Harvey": "",
|
||||
"Sandy": "",
|
||||
"Willy": "",
|
||||
"Krobus": ""
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"Alex": "",
|
||||
"Elliott": "",
|
||||
"Harvey": "",
|
||||
"Sam": "",
|
||||
"Sebastian": "",
|
||||
"Shane": "",
|
||||
"Abigail": "",
|
||||
"Emily": "",
|
||||
"Haley": "",
|
||||
"Leah": "",
|
||||
"Maru": "",
|
||||
"Penny": ""
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Mail:birthdayMom": "",
|
||||
"Mail:birthdayDad": "",
|
||||
"Happy Birthday: Star Message": "",
|
||||
"Happy Birthday: Farmhand Birthday Message": ""
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"Robin": "",
|
||||
"Demetrius": "",
|
||||
"Maru": "",
|
||||
"Sebastian": "",
|
||||
"Linus": "",
|
||||
"Pierre": "",
|
||||
"Caroline": "",
|
||||
"Abigail": "",
|
||||
"Alex": "",
|
||||
"George": "",
|
||||
"Evelyn": "",
|
||||
"Lewis": "",
|
||||
"Clint": "",
|
||||
"Penny": "",
|
||||
"Pam": "",
|
||||
"Emily": "",
|
||||
"Haley": "",
|
||||
"Jas": "",
|
||||
"Vincent": "",
|
||||
"Jodi": "",
|
||||
"Kent": "",
|
||||
"Sam": "",
|
||||
"Leah": "",
|
||||
"Shane": "",
|
||||
"Marnie": "",
|
||||
"Elliott": "",
|
||||
"Gus": "",
|
||||
"Dwarf": "",
|
||||
"Wizard": "",
|
||||
"Harvey": "",
|
||||
"Sandy": "",
|
||||
"Willy": "",
|
||||
"Krobus": ""
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"Alex": "",
|
||||
"Elliott": "",
|
||||
"Harvey": "",
|
||||
"Sam": "",
|
||||
"Sebastian": "",
|
||||
"Shane": "",
|
||||
"Abigail": "",
|
||||
"Emily": "",
|
||||
"Haley": "",
|
||||
"Leah": "",
|
||||
"Maru": "",
|
||||
"Penny": ""
|
||||
}
|
|
@ -73,8 +73,10 @@ namespace Omegasis.HappyBirthday.Framework
|
|||
this.DayButtons.Clear();
|
||||
this.OkButton = new ClickableTextureComponent("OK", new Rectangle(this.xPositionOnScreen + this.width - IClickableMenu.borderWidth - IClickableMenu.spaceToClearSideBorder - Game1.tileSize, this.yPositionOnScreen + this.height - IClickableMenu.borderWidth - IClickableMenu.spaceToClearTopBorder + Game1.tileSize / 4, Game1.tileSize, Game1.tileSize), "", null, Game1.mouseCursors, Game1.getSourceRectForStandardTileSheet(Game1.mouseCursors, 46), 1f);
|
||||
|
||||
this.Labels.Add(new ClickableComponent(new Rectangle(this.xPositionOnScreen + Game1.tileSize / 4 + IClickableMenu.spaceToClearSideBorder + IClickableMenu.borderWidth + Game1.tileSize * 3 + 8, this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder - Game1.tileSize / 8, 1, 1), "Birthday Season: " + this.BirthdaySeason));
|
||||
this.Labels.Add(new ClickableComponent(new Rectangle(this.xPositionOnScreen + Game1.tileSize / 4 + IClickableMenu.spaceToClearSideBorder + IClickableMenu.borderWidth + Game1.tileSize * 3 + 8, this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + Game1.tileSize, Game1.tileSize * 2, Game1.tileSize), "Birthday Date: " + this.BirthdayDay));
|
||||
string bdaySeason = HappyBirthday.Config.translationInfo.getTranslatedString("Birthday") + " " + HappyBirthday.Config.translationInfo.getTranslatedString("Season");
|
||||
string bdayDay= HappyBirthday.Config.translationInfo.getTranslatedString("Birthday") + " " + HappyBirthday.Config.translationInfo.getTranslatedString("Date");
|
||||
this.Labels.Add(new ClickableComponent(new Rectangle(this.xPositionOnScreen + Game1.tileSize / 4 + IClickableMenu.spaceToClearSideBorder + IClickableMenu.borderWidth + Game1.tileSize * 3 + 8, this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder - Game1.tileSize / 8, 1, 1), bdaySeason+": " + this.BirthdaySeason));
|
||||
this.Labels.Add(new ClickableComponent(new Rectangle(this.xPositionOnScreen + Game1.tileSize / 4 + IClickableMenu.spaceToClearSideBorder + IClickableMenu.borderWidth + Game1.tileSize * 3 + 8, this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + Game1.tileSize, Game1.tileSize * 2, Game1.tileSize), bdayDay+": " + this.BirthdayDay));
|
||||
this.SeasonButtons.Add(new ClickableTextureComponent("Spring", new Rectangle(this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + IClickableMenu.borderWidth + Game1.tileSize * 1 - Game1.tileSize / 4, this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + (int)(Game1.tileSize * 3.10) - Game1.tileSize / 4, Game1.tileSize * 2, Game1.tileSize), "", "", Game1.mouseCursors, new Rectangle(188, 438, 32, 9), Game1.pixelZoom));
|
||||
this.SeasonButtons.Add(new ClickableTextureComponent("Summer", new Rectangle(this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + IClickableMenu.borderWidth + Game1.tileSize * 3 - Game1.tileSize / 4, this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + (int)(Game1.tileSize * 3.10) - Game1.tileSize / 4, Game1.tileSize * 2, Game1.tileSize), "", "", Game1.mouseCursors, new Rectangle(220, 438, 32, 8), Game1.pixelZoom));
|
||||
this.SeasonButtons.Add(new ClickableTextureComponent("Fall", new Rectangle(this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + IClickableMenu.borderWidth + Game1.tileSize * 5 - Game1.tileSize / 4, this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + (int)(Game1.tileSize * 3.1) - Game1.tileSize / 4, Game1.tileSize * 2, Game1.tileSize), "", "", Game1.mouseCursors, new Rectangle(188, 447, 32, 10), Game1.pixelZoom));
|
||||
|
@ -144,7 +146,7 @@ namespace Omegasis.HappyBirthday.Framework
|
|||
case "Summer":
|
||||
case "Fall":
|
||||
case "Winter":
|
||||
this.BirthdaySeason = name.ToLower();
|
||||
this.BirthdaySeason = HappyBirthday.Config.translationInfo.getTranslatedString(name);
|
||||
this.OnChanged(this.BirthdaySeason, this.BirthdayDay);
|
||||
Game1.activeClickableMenu = new BirthdayMenu(this.BirthdaySeason, this.BirthdayDay, this.OnChanged);
|
||||
break;
|
||||
|
|
|
@ -24,6 +24,12 @@ namespace Omegasis.HappyBirthday.Framework
|
|||
Turkish,
|
||||
Hungarian
|
||||
}
|
||||
|
||||
public enum FileType
|
||||
{
|
||||
XNB,
|
||||
JSON
|
||||
}
|
||||
/*********
|
||||
** Accessors
|
||||
*********/
|
||||
|
@ -45,19 +51,19 @@ namespace Omegasis.HappyBirthday.Framework
|
|||
/// <summary>Construct an instance.</summary>
|
||||
public TranslationInfo()
|
||||
{
|
||||
this.TranslationFileExtensions.Add(LanguageName.English, ".xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Spanish, ".es-ES.xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Chinese, ".zh-CN.xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Japanese, ".ja-JP.xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Russian, ".ru-RU.xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.German, ".de-DE.xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Portuguese, ".pt-BR.xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.English, "en-US");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Spanish, "es-ES");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Chinese, "zh-CN");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Japanese, "ja-JP");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Russian, "ru-RU");
|
||||
this.TranslationFileExtensions.Add(LanguageName.German, "de-DE");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Portuguese, "pt-BR");
|
||||
//1.3 languages.
|
||||
this.TranslationFileExtensions.Add(LanguageName.Italian, ".it-IT.xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.French, ".fr-FR.xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Hungarian, ".hu-HU.xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Turkish, ".tr-TR.xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Korean, ".ko-KR.xnb");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Italian, "it-IT");
|
||||
this.TranslationFileExtensions.Add(LanguageName.French, "fr-FR");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Hungarian, "hu-HU");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Turkish, "tr-TR");
|
||||
this.TranslationFileExtensions.Add(LanguageName.Korean, "ko-KR");
|
||||
|
||||
|
||||
this.TranslationCodes.Add(LanguageName.English, LocalizedContentManager.LanguageCode.en);
|
||||
|
@ -74,33 +80,26 @@ namespace Omegasis.HappyBirthday.Framework
|
|||
this.TranslationCodes.Add(LanguageName.Turkish, LocalizedContentManager.LanguageCode.tr);
|
||||
this.TranslationCodes.Add(LanguageName.Korean, LocalizedContentManager.LanguageCode.ko);
|
||||
}
|
||||
|
||||
/// <summary>Get the language name from a string.</summary>
|
||||
/// <param name="language">The language name.</param>
|
||||
public string getTranslationName(LanguageName language)
|
||||
/// <summary>
|
||||
/// Gets the current SDV translation code.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public LocalizedContentManager.LanguageCode getCurrrentLanguageCode()
|
||||
{
|
||||
return language.ToString();
|
||||
}
|
||||
|
||||
public void changeLocalizedContentManagerFromTranslation(LanguageName language)
|
||||
{
|
||||
LocalizedContentManager.CurrentLanguageCode = !this.TranslationCodes.TryGetValue(language, out LocalizedContentManager.LanguageCode code)
|
||||
? LocalizedContentManager.LanguageCode.en
|
||||
: code;
|
||||
}
|
||||
|
||||
public void resetLocalizationCode()
|
||||
{
|
||||
LocalizedContentManager.CurrentLanguageCode = LocalizedContentManager.LanguageCode.en;
|
||||
return this.TranslationCodes[this.CurrentTranslation];
|
||||
}
|
||||
|
||||
/// <summary>Gets the proper file extension for the current translation.</summary>
|
||||
/// <param name="language">The translation language name.</param>
|
||||
public string getFileExtentionForTranslation(LanguageName language)
|
||||
public string getFileExtentionForTranslation(LanguageName language, FileType File)
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.TranslationFileExtensions[language];
|
||||
if (language == LanguageName.English)
|
||||
{
|
||||
return this.getFileExtensionForFileType(File);
|
||||
}
|
||||
return this.TranslationFileExtensions[language]+this.getFileExtensionForFileType(File);
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
|
@ -110,14 +109,24 @@ namespace Omegasis.HappyBirthday.Framework
|
|||
return ".xnb";
|
||||
}
|
||||
}
|
||||
public string getFileExtensionForFileType(FileType Type)
|
||||
{
|
||||
if(Type== FileType.JSON)
|
||||
{
|
||||
return ".json";
|
||||
}
|
||||
else
|
||||
{
|
||||
return ".xnb";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string getFileExtentionForDirectory(LanguageName language)
|
||||
{
|
||||
try
|
||||
{
|
||||
string s=this.TranslationFileExtensions[language];
|
||||
s = s.Replace(".xnb", "");
|
||||
s = s.Replace(".","");
|
||||
return s;
|
||||
}
|
||||
catch (Exception err)
|
||||
|
@ -125,32 +134,33 @@ namespace Omegasis.HappyBirthday.Framework
|
|||
|
||||
Omegasis.HappyBirthday.HappyBirthday.ModMonitor.Log(err.ToString());
|
||||
Omegasis.HappyBirthday.HappyBirthday.ModMonitor.Log($"Attempted to get translation: {language}");
|
||||
return ".xnb";
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the proper XNB for Buildings (aka Blueprints) from the data folder.</summary>
|
||||
public string getBuildingXNBForTranslation(LanguageName language)
|
||||
{
|
||||
string buildings = "Blueprints";
|
||||
return buildings + this.getFileExtentionForTranslation(language);
|
||||
}
|
||||
|
||||
/// <summary>Gets the proper XNB file for the name passed in. Combines the file name with it's proper translation extension.</summary>
|
||||
public string getXNBForTranslation(string xnbFileName, LanguageName language)
|
||||
{
|
||||
return xnbFileName + this.getFileExtentionForTranslation(language);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the json file for the translation.
|
||||
/// </summary>
|
||||
/// <param name="FileName"></param>
|
||||
/// <param name="language"></param>
|
||||
/// <returns></returns>
|
||||
public string getJSONForTranslation(string FileName,LanguageName language)
|
||||
{
|
||||
return this.getXNBForTranslation(FileName, language);
|
||||
if(language!= LanguageName.English)
|
||||
{
|
||||
return FileName + "." + this.getFileExtentionForTranslation(language, FileType.JSON);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FileName + this.getFileExtentionForTranslation(language, FileType.JSON);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Loads an XNB file from StardewValley/Content</summary>
|
||||
public string LoadStringFromXNBFile(string xnbFileName, string key, LanguageName language)
|
||||
{
|
||||
string xnb = xnbFileName + this.getFileExtentionForTranslation(language);
|
||||
string xnb = xnbFileName + this.getFileExtentionForTranslation(language, FileType.XNB);
|
||||
Dictionary<string, string> loadedDict = Game1.content.Load<Dictionary<string, string>>(xnb);
|
||||
|
||||
if (!loadedDict.TryGetValue(key, out string loaded))
|
||||
|
@ -161,42 +171,6 @@ namespace Omegasis.HappyBirthday.Framework
|
|||
return loaded;
|
||||
}
|
||||
|
||||
public virtual string LoadString(string path, LanguageName language, object sub1, object sub2, object sub3)
|
||||
{
|
||||
string format = this.LoadString(path, language);
|
||||
try
|
||||
{
|
||||
return string.Format(format, sub1, sub2, sub3);
|
||||
}
|
||||
catch { }
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
public virtual string LoadString(string path, LanguageName language, object sub1, object sub2)
|
||||
{
|
||||
string format = this.LoadString(path, language);
|
||||
try
|
||||
{
|
||||
return string.Format(format, sub1, sub2);
|
||||
}
|
||||
catch { }
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
public virtual string LoadString(string path, LanguageName language, object sub1)
|
||||
{
|
||||
string format = this.LoadString(path, language);
|
||||
try
|
||||
{
|
||||
return string.Format(format, sub1);
|
||||
}
|
||||
catch { }
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
public virtual string LoadString(string path, LanguageName language)
|
||||
{
|
||||
this.parseStringPath(path, out string assetName, out string key);
|
||||
|
@ -204,25 +178,43 @@ namespace Omegasis.HappyBirthday.Framework
|
|||
return this.LoadStringFromXNBFile(assetName, key, language);
|
||||
}
|
||||
|
||||
public virtual string LoadString(string path, LanguageName language, params object[] substitutions)
|
||||
{
|
||||
string format = this.LoadString(path, language);
|
||||
if (substitutions.Length != 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
return string.Format(format, substitutions);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
return format;
|
||||
}
|
||||
|
||||
private void parseStringPath(string path, out string assetName, out string key)
|
||||
{
|
||||
int length = path.IndexOf(':');
|
||||
assetName = path.Substring(0, length);
|
||||
key = path.Substring(length + 1, path.Length - length - 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a translated string from the the dictionary with the proper translation; Returns an empty string if this fails somehow.
|
||||
/// </summary>
|
||||
/// <param name="Language"></param>
|
||||
/// <param name="Key"></param>
|
||||
/// <returns></returns>
|
||||
public string getTranslatedString(LocalizedContentManager.LanguageCode Language, string Key)
|
||||
{
|
||||
try
|
||||
{
|
||||
return HappyBirthday.Instance.messages.translatedStrings[Language][Key];
|
||||
|
||||
}
|
||||
catch(Exception err)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public string getTranslatedString(string Key)
|
||||
{
|
||||
try
|
||||
{
|
||||
return HappyBirthday.Instance.messages.translatedStrings[this.getCurrrentLanguageCode()][Key];
|
||||
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,6 +89,8 @@ namespace Omegasis.HappyBirthday
|
|||
helper.Events.Input.ButtonPressed += this.OnButtonPressed;
|
||||
helper.Events.Display.MenuChanged += this.OnMenuChanged;
|
||||
|
||||
|
||||
|
||||
helper.Events.Display.RenderedActiveMenu += this.OnRenderedActiveMenu;
|
||||
helper.Events.Display.RenderedHud += this.OnRenderedHud;
|
||||
//MultiplayerSupport.initializeMultiplayerSupport();
|
||||
|
@ -337,16 +339,39 @@ namespace Omegasis.HappyBirthday
|
|||
IReflectedField<List<string>> dialogues = this.Helper.Reflection.GetField<List<string>>((Game1.activeClickableMenu as DialogueBox), "dialogues", true);
|
||||
string dialogueMessage = "";
|
||||
if (Game1.player.getSpouse() != null)
|
||||
{
|
||||
if (Game1.player.getSpouse().Name.Equals(Game1.currentSpeaker.Name))
|
||||
{
|
||||
if (this.messages.spouseBirthdayWishes.ContainsKey(Game1.currentSpeaker.Name))
|
||||
{
|
||||
dialogueMessage = this.messages.spouseBirthdayWishes[Game1.currentSpeaker.Name];
|
||||
if (string.IsNullOrEmpty(dialogueMessage))
|
||||
{
|
||||
dialogueMessage = this.messages.generateSpouseBirthdayDialogue(Game1.currentSpeaker.Name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dialogueMessage = this.messages.generateSpouseBirthdayDialogue(Game1.currentSpeaker.Name);
|
||||
if (string.IsNullOrEmpty(dialogueMessage))
|
||||
{
|
||||
dialogueMessage = "Happy Birthday @!";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.messages.birthdayWishes.ContainsKey(Game1.currentSpeaker.Name))
|
||||
{
|
||||
|
||||
dialogueMessage = this.messages.birthdayWishes[Game1.currentSpeaker.Name];
|
||||
}
|
||||
else
|
||||
{
|
||||
dialogueMessage = "Happy Birthday @!";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.messages.birthdayWishes.ContainsKey(Game1.currentSpeaker.Name))
|
||||
|
@ -416,15 +441,7 @@ namespace Omegasis.HappyBirthday
|
|||
}
|
||||
else
|
||||
{
|
||||
if (this.messages.birthdayWishes.ContainsKey(Game1.currentSpeaker.Name))
|
||||
{
|
||||
|
||||
d = new Dialogue(this.messages.birthdayWishes[Game1.currentSpeaker.Name], Game1.currentSpeaker);
|
||||
}
|
||||
else
|
||||
{
|
||||
d = new Dialogue("Happy Birthday @!", Game1.currentSpeaker);
|
||||
}
|
||||
d =new Dialogue(this.messages.generateSpouseBirthdayDialogue(Game1.currentSpeaker.Name),Game1.currentSpeaker);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -489,6 +506,8 @@ namespace Omegasis.HappyBirthday
|
|||
this.Monitor.Log(ex.ToString(), LogLevel.Error);
|
||||
}
|
||||
this.CheckedForBirthday = false;
|
||||
|
||||
Game1.player.changeFriendship(1000, Game1.getCharacterFromName("Penny", true));
|
||||
}
|
||||
|
||||
/// <summary>Raised after the player presses a button on the keyboard, controller, or mouse.</summary>
|
||||
|
@ -526,6 +545,11 @@ namespace Omegasis.HappyBirthday
|
|||
}
|
||||
//this.SeenEvent = false;
|
||||
//this.Dialogue = new Dictionary<string, Dialogue>();
|
||||
|
||||
|
||||
//Game1.player.addItemToInventoryBool(new StardewValley.Object(388, 999));
|
||||
//Game1.player.addItemToInventoryBool(new StardewValley.Object(390, 999));
|
||||
//Game1.player.Money = 999999;
|
||||
}
|
||||
|
||||
/// <summary>Raised before the game begins writes data to the save file (except the initial save creation).</summary>
|
||||
|
@ -586,19 +610,36 @@ namespace Omegasis.HappyBirthday
|
|||
bool spouseMessage = false; //Used to determine if there is a valid spouse message for the player. If false load in the generic birthday wish.
|
||||
//Check if npc name is spouse's name. If no spouse then add in generic dialogue.
|
||||
if (this.messages.spouseBirthdayWishes.ContainsKey(npc.Name) && Game1.player.isMarried())
|
||||
{
|
||||
if (Game1.player.getSpouse().Name.Equals(npc.Name))
|
||||
{
|
||||
//this.Monitor.Log("Spouse Checks out");
|
||||
//Check to see if spouse message exists.
|
||||
if (!string.IsNullOrEmpty(this.messages.spouseBirthdayWishes[npc.Name]))
|
||||
{
|
||||
spouseMessage = true;
|
||||
Dialogue d = new Dialogue(this.messages.spouseBirthdayWishes[npc.Name], npc);
|
||||
|
||||
string message = this.messages.spouseBirthdayWishes[npc.Name];
|
||||
if (string.IsNullOrEmpty(message))
|
||||
{
|
||||
message = this.messages.generateSpouseBirthdayDialogue(npc.Name);
|
||||
}
|
||||
Dialogue d = new Dialogue(message, npc);
|
||||
npc.CurrentDialogue.Push(d);
|
||||
if (npc.CurrentDialogue.ElementAt(0) != d) npc.setNewDialogue(this.messages.spouseBirthdayWishes[npc.Name]);
|
||||
if (npc.CurrentDialogue.ElementAt(0) != d) npc.setNewDialogue(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
string message = this.messages.generateSpouseBirthdayDialogue(npc.Name);
|
||||
Dialogue d = new Dialogue(message, npc);
|
||||
npc.CurrentDialogue.Push(d);
|
||||
if (npc.CurrentDialogue.ElementAt(0) != d) npc.setNewDialogue(message);
|
||||
spouseMessage = true;
|
||||
this.Monitor.Log("No spouse message???", LogLevel.Warn);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (!spouseMessage)
|
||||
{
|
||||
//Load in
|
||||
|
|
|
@ -95,46 +95,84 @@
|
|||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Content\Dialogue\Brazillian Portuguese\BirthdayWishes.pt-BR.json">
|
||||
<None Include="Content\Dialogue\fr-FR\BirthdayWishes.fr-FR.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\Brazillian Portuguese\SpouseBirthdayWishes.pt-BR.json">
|
||||
<None Include="Content\Dialogue\fr-FR\SpouseBirthdayWishes.fr-FR.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\Chinese\BirthdayWishes.zh-CN.json">
|
||||
<None Include="Content\Dialogue\fr-FR\TranslatedStrings.fr-FR.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\Chinese\SpouseBirthdayWishes.zh-CN.json">
|
||||
<None Include="Content\Dialogue\hu-HU\BirthdayWishes.hu-HU.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\English\BirthdayWishes.json">
|
||||
<None Include="Content\Dialogue\hu-HU\SpouseBirthdayWishes.hu-HU.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\English\SpouseBirthdayWishes.json">
|
||||
<None Include="Content\Dialogue\hu-HU\TranslatedStrings.hu-HU.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\German\BirthdayWishes.de-DE.json">
|
||||
<None Include="Content\Dialogue\it-IT\BirthdayWishes.it-IT.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\German\SpouseBirthdayWishes.de-DE.json">
|
||||
<None Include="Content\Dialogue\it-IT\SpouseBirthdayWishes.it-IT.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\Japanese\BirthdayWishes.ja-JP.json">
|
||||
<None Include="Content\Dialogue\it-IT\TranslatedStrings.it-IT.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\Japanese\SpouseBirthdayWishes.ja-JP.json">
|
||||
<None Include="Content\Dialogue\ko-KR\BirthdayWishes.ko-KR.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\Russian\BirthdayWishes.ru-RU.json">
|
||||
<None Include="Content\Dialogue\ko-KR\SpouseBirthdayWishes.ko-KR.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\Russian\SpouseBirthdayWishes.ru-RU.json">
|
||||
<None Include="Content\Dialogue\ko-KR\TranslatedStrings.ko-KR.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\Spanish\BirthdayWishes.es-ES.json">
|
||||
<None Include="Content\Dialogue\pt-BR\BirthdayWishes.pt-BR.json" />
|
||||
<None Include="Content\Dialogue\pt-BR\SpouseBirthdayWishes.pt-BR.json" />
|
||||
<None Include="Content\Dialogue\pt-BR\TranslatedStrings.pt-BR.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\Spanish\SpouseBirthdayWishes.es-ES.json">
|
||||
<None Include="Content\Dialogue\tr-TR\BirthdayWishes.tr-TR.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\tr-TR\SpouseBirthdayWishes.tr-TR.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\tr-TR\TranslatedStrings.tr-TR.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\zh-CN\BirthdayWishes.zh-CN.json" />
|
||||
<None Include="Content\Dialogue\zh-CN\SpouseBirthdayWishes.zh-CN.json" />
|
||||
<None Include="Content\Dialogue\zh-CN\TranslatedStrings.zh-CN.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\en-US\BirthdayWishes.json" />
|
||||
<None Include="Content\Dialogue\en-US\SpouseBirthdayWishes.json" />
|
||||
<None Include="Content\Dialogue\en-US\TranslatedStrings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\de-DE\BirthdayWishes.de-DE.json" />
|
||||
<None Include="Content\Dialogue\de-DE\SpouseBirthdayWishes.de-DE.json" />
|
||||
<None Include="Content\Dialogue\de-DE\TranslatedStrings.de-DE.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\ja-JP\BirthdayWishes.ja-JP.json" />
|
||||
<None Include="Content\Dialogue\ja-JP\SpouseBirthdayWishes.ja-JP.json" />
|
||||
<None Include="Content\Dialogue\ja-JP\TranslatedStrings.ja-JP.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\ru-RU\BirthdayWishes.ru-RU.json" />
|
||||
<None Include="Content\Dialogue\ru-RU\SpouseBirthdayWishes.ru-RU.json" />
|
||||
<None Include="Content\Dialogue\ru-RU\TranslatedStrings.ru-RU.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Dialogue\es-ES\BirthdayWishes.es-ES.json" />
|
||||
<None Include="Content\Dialogue\es-ES\SpouseBirthdayWishes.es-ES.json" />
|
||||
<None Include="Content\Dialogue\es-ES\TranslatedStrings.es-ES.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Content\Gifts\BirthdayGifts.json" />
|
||||
|
@ -147,6 +185,7 @@
|
|||
<ItemGroup>
|
||||
<Content Include="Changelog.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(SolutionDir)\deploy.targets" />
|
||||
</Project>
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"Name": "Happy Birthday",
|
||||
"Author": "Alpha_Omegasis",
|
||||
"Version": "1.9.1",
|
||||
"Version": "1.10.0",
|
||||
"Description": "Adds the farmer's birthday to the game.",
|
||||
"UniqueID": "Omegasis.HappyBirthday",
|
||||
"EntryDll": "HappyBirthday.dll",
|
||||
|
|
|
@ -44,6 +44,13 @@ namespace Omegasis.TimeFreeze
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Patch in the underground mine shaft.
|
||||
if (this.Config.freezeTimeInThisLocation.ContainsKey("UndergroundMine") == false)
|
||||
{
|
||||
this.Config.freezeTimeInThisLocation.Add("UndergroundMine", true);
|
||||
}
|
||||
|
||||
this.Helper.WriteConfig<ModConfig>(this.Config);
|
||||
}
|
||||
|
||||
|
@ -130,7 +137,9 @@ namespace Omegasis.TimeFreeze
|
|||
{
|
||||
Farmer player = Game1.player;
|
||||
if (this.ShouldFreezeTime(player, player.currentLocation))
|
||||
{
|
||||
Game1.gameTimeInterval = 0;
|
||||
}
|
||||
//else
|
||||
// Game1.gameTimeInterval = this.oldInterval;
|
||||
}
|
||||
|
@ -141,15 +150,11 @@ namespace Omegasis.TimeFreeze
|
|||
/// <param name="location">The location to check.</param>
|
||||
private bool ShouldFreezeTime(Farmer player, GameLocation location)
|
||||
{
|
||||
|
||||
if (Game1.showingEndOfNightStuff) return false;
|
||||
if (this.Config.freezeTimeInThisLocation.ContainsKey(location.Name))
|
||||
{
|
||||
if (location.Name == "Mine" || location.Name.StartsWith("UndergroundMine"))
|
||||
{
|
||||
return this.Config.freezeTimeInThisLocation["Mine"];
|
||||
}
|
||||
|
||||
if (location.Name == "SkullCave" || location.Name.StartsWith("SkullCave"))
|
||||
if (location.Name.Equals("SkullCave") || location.Name.StartsWith("SkullCave"))
|
||||
{
|
||||
return this.Config.freezeTimeInThisLocation["SkullCave"];
|
||||
}
|
||||
|
@ -163,6 +168,20 @@ namespace Omegasis.TimeFreeze
|
|||
return this.Config.freezeTimeInThisLocation[location.Name];
|
||||
}
|
||||
|
||||
if (location.NameOrUniqueName.StartsWith("UndergroundMine"))
|
||||
{
|
||||
return this.Config.freezeTimeInThisLocation["UndergroundMine"];
|
||||
}
|
||||
|
||||
//Skull cave check.
|
||||
if (location.Name.Equals("SkullCave") || location.Name.StartsWith("SkullCave"))
|
||||
{
|
||||
return this.Config.freezeTimeInThisLocation["SkullCave"];
|
||||
}
|
||||
|
||||
|
||||
//this.Monitor.Log(Game1.player.currentLocation.NameOrUniqueName, LogLevel.Info);
|
||||
|
||||
//If for some reason the location wasn't accounted for then just freeze time there by default.
|
||||
if (location.IsOutdoors)
|
||||
return false;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"Name": "Time Freeze",
|
||||
"Author": "Alpha_Omegasis",
|
||||
"Version": "1.9.0",
|
||||
"Version": "1.9.1",
|
||||
"Description": "Emulates old Harvest Moon aka (Story of Seasons) style games where time is frozen inside.",
|
||||
"UniqueID": "Omegasis.TimeFreeze",
|
||||
"EntryDll": "TimeFreeze.dll",
|
||||
|
|
Loading…
Reference in New Issue