Fixed SaveAnywhere issue with not finding npc field nameofTodaysSchedule as it was renamed to nameOfTodaysSchedule in SDV 1.32

This commit is contained in:
Joshua Navarro 2019-01-06 09:28:14 -08:00
parent b4f89b02d0
commit 000f3802df
1 changed files with 2 additions and 2 deletions

View File

@ -325,14 +325,14 @@ namespace Omegasis.SaveAnywhere
if ((npc.Name.Equals("Penny") && (dayName.Equals("Tue") || dayName.Equals("Wed") || dayName.Equals("Fri"))) || (npc.Name.Equals("Maru") && (dayName.Equals("Tue") || dayName.Equals("Thu"))) || (npc.Name.Equals("Harvey") && (dayName.Equals("Tue") || dayName.Equals("Thu")))) if ((npc.Name.Equals("Penny") && (dayName.Equals("Tue") || dayName.Equals("Wed") || dayName.Equals("Fri"))) || (npc.Name.Equals("Maru") && (dayName.Equals("Tue") || dayName.Equals("Thu"))) || (npc.Name.Equals("Harvey") && (dayName.Equals("Tue") || dayName.Equals("Thu"))))
{ {
this.Helper.Reflection this.Helper.Reflection
.GetField<string>(npc, "nameofTodaysSchedule") .GetField<string>(npc, "nameOfTodaysSchedule")
.SetValue("marriageJob"); .SetValue("marriageJob");
return "marriageJob"; return "marriageJob";
} }
if (!Game1.isRaining && schedule.ContainsKey("marriage_" + Game1.shortDayNameFromDayOfSeason(Game1.dayOfMonth))) if (!Game1.isRaining && schedule.ContainsKey("marriage_" + Game1.shortDayNameFromDayOfSeason(Game1.dayOfMonth)))
{ {
this.Helper.Reflection this.Helper.Reflection
.GetField<string>(npc, "nameofTodaysSchedule") .GetField<string>(npc, "nameOfTodaysSchedule")
.SetValue("marriage_" + Game1.shortDayNameFromDayOfSeason(Game1.dayOfMonth)); .SetValue("marriage_" + Game1.shortDayNameFromDayOfSeason(Game1.dayOfMonth));
return "marriage_" + Game1.shortDayNameFromDayOfSeason(Game1.dayOfMonth); return "marriage_" + Game1.shortDayNameFromDayOfSeason(Game1.dayOfMonth);
} }