|
|
@ -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;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|