Enticing the bookkeeper to work more often

develop
Eric Wald 2015-03-20 19:23:04 -06:00
parent 23707db1d3
commit 4f963233f4
2 changed files with 16 additions and 6 deletions

@ -22,6 +22,7 @@ DFHack Future
stockflow: Fixed error message in Arena mode stockflow: Fixed error message in Arena mode
stockflow: No longer checks the DF version stockflow: No longer checks the DF version
stockflow: Fixed ballistic arrow head orders stockflow: Fixed ballistic arrow head orders
stockflow: Now convinces the bookkeeper to update records more often
zone: Stopped crash when scrolling cage owner list zone: Stopped crash when scrolling cage owner list
New Plugins New Plugins
New Scripts New Scripts

@ -81,12 +81,21 @@ public:
} }
} }
if (found && !bookkeeping) { if (found) {
command_method("start_bookkeeping", out); // Entice the bookkeeper to spend less time update records.
bookkeeping = true; ui->bookkeeper_precision += ui->bookkeeper_precision >> 3;
} else if (bookkeeping && !found) { if (!bookkeeping) {
command_method("finish_bookkeeping", out); command_method("start_bookkeeping", out);
bookkeeping = false; bookkeeping = true;
}
} else {
// Entice the bookkeeper to update records more often.
ui->bookkeeper_precision -= ui->bookkeeper_precision >> 5;
ui->bookkeeper_cooldown -= ui->bookkeeper_cooldown >> 2;
if (bookkeeping) {
command_method("finish_bookkeeping", out);
bookkeeping = false;
}
} }
} }