0 of 0

File information

Last updated

Original upload

Created by

barrichelly

Uploaded by

barrichelly

Virus scan

Safe to use

About this mod

This mod fixes Penny's married schedule. She will no longer go through her teaching job with no kids present, either due to rain or special dates.

Requirements
Permissions and credits
The code responsible for loading a character's schedule makes 3 exceptions for those who are married with a profession. Those 3 NPCs are Maru, Harvey, and Penny. Penny's job relies on the schedule of 2 other NPCs: Jas and Vincent. Normally, Penny lectures on Tuesdays, Wednesdays, and Fridays, unless it is the 9th, the 23rd, or it is raining. This is incorporated into her non-married schedule, however when she is married, the code neglects to check for these cases:


if (isMarried())
{
...
if (base.Name == "Penny")
    {
        switch (dayName)
        {
            case "Tue":
            case "Wed":
            case "Fri":
                goto IL_0205;
        }
    }
    ...
}
...
IL_0205:
if (TryLoadSchedule("marriageJob"))
{
    return true;
}


The code snippet above is the original code snippet responsible for the bug. As you can see, for Penny, if she is married, and it is either "Tue", "Wed", or "Fri", it will "goto IL_205", which loads her job schedule, with no check for the cases mentioned previously. This mod uses a Harmony patch Postfix to essentially add an additional check for rain, if its the 9th, or if its the 23rd, and if so, clears her schedule causing her to spend the day at home.