Skip to content
Snippets Groups Projects
Commit 0ab9cd91 authored by svornost's avatar svornost
Browse files

When reassigning slaves from the cellblock, terminate the report early (as we...

When reassigning slaves from the cellblock, terminate the report early (as we do for schoolroom and clinic), since the standard report should be run at her new assignment.
parent 430e9171
No related branches found
No related tags found
1 merge request!8715Fixes
......@@ -306,16 +306,21 @@ App.EndWeek.cellblockReport = function() {
confinedResults = App.SlaveAssignment.stayConfined(slave);
App.Events.addNode(slaveEntry, [He, confinedResults.text], "div", "indent");
if (confinedResults.broken) {
brokenSlaves++;
continue; // slave has been reassigned; remaining report will run at her new assignment
}
slaveEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false));
} else {
// discard return values silently
App.SlaveAssignment.choosesOwnJob(slave);
confinedResults = App.SlaveAssignment.stayConfined(slave);
if (confinedResults.broken) {
brokenSlaves++;
continue; // slave has been reassigned; remaining report will run at her new assignment
}
App.SlaveAssignment.standardSlaveReport(slave, true);
}
if (confinedResults.broken) {
brokenSlaves++;
}
}
if (softenedQuirks || brokenSlaves) {
r = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment