Accessing ReportManager.Instance.YesterdaysReport returns null on the second cycle, when there is a report for the previous day.
It looks like todaysReport is not added to the dailyReports until night, so this code,
public ReportManager.DailyReport YesterdaysReport
{
get
{
if (this.dailyReports.Count <= 1)
{
return null;
}
return this.dailyReports[this.dailyReports.Count - 1];
}
}
should probably check for 0 not 1,
public ReportManager.DailyReport YesterdaysReport
{
get
{
if (this.dailyReports.Count = 0)
{
return null;
}
return this.dailyReports[this.dailyReports.Count - 1];
}
}
Noticed this because the insufficient oxygen generation notification won't trigger on the first or second cycle.
Steps to Reproduce
Access ReportManager.Instance.YesterdaysReport on the second cycle and get null, when the cycle 1 report should be returned.
Access ReportManager.Instance.YesterdaysReport on the second cycle and get null, when the cycle 1 report should be returned.
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now