-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A couple of small bugfixes #194
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -524,9 +524,9 @@ void TextReportGenerator::output(ostream& f, const json& report, bool show_regio | |
|
||
bool show_unit_attitudes = false; | ||
if (report.contains("administrative")) { | ||
if (!report["administrative"].contains("times_sent")) | ||
if (!report["administrative"].contains("times_sent") || !report["administrative"]["times_sent"]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd initially made the assumption here that the field wouldn't be output at all if it was false, but the actual generation In the case of times, if the value isn't set OR it's set to false then the times isn't being set. For the password, if it's set AND it's set to true then we output the warning. Found this while testing the new website with an downloaded report for a new faction where it had a password set.. |
||
f << "Note: The Times is not being sent to you.\n\n"; | ||
if (report["administrative"].contains("password_unset")) | ||
if (report["administrative"].contains("password_unset") && report["administrative"]["password_unset"]) | ||
f << "REMINDER: You have not set a password for your faction!\n\n"; | ||
if (report["administrative"].contains("inactivity_deletion_turns")) { | ||
f << "WARNING: You have " << report["administrative"]["inactivity_deletion_turns"] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 is the signifier for ignore turn inactivity, and if(-1) evaluates to true, so this was a bug but unlikely to get caught since noone actually runs with -1 as the inactive turn setup.