invalidate resume cache when buildings are added

develop
myk002 2021-05-26 22:29:55 -07:00
parent b651ea88d2
commit 5e127ed1e8
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 6 additions and 0 deletions

@ -41,6 +41,7 @@ DFHACK_PLUGIN("resume");
#define PLUGIN_VERSION 0.2 #define PLUGIN_VERSION 0.2
REQUIRE_GLOBAL(gps); REQUIRE_GLOBAL(gps);
REQUIRE_GLOBAL(process_jobs);
REQUIRE_GLOBAL(ui); REQUIRE_GLOBAL(ui);
REQUIRE_GLOBAL(world); REQUIRE_GLOBAL(world);
@ -222,6 +223,11 @@ struct resume_hook : public df::viewscreen_dwarfmodest
if (enabled && DFHack::World::ReadPauseState() && ui->main.mode == ui_sidebar_mode::Default) if (enabled && DFHack::World::ReadPauseState() && ui->main.mode == ui_sidebar_mode::Default)
{ {
if (*process_jobs)
{
// something just created some buildings. rescan.
clear_scanned();
}
scan_for_suspended_buildings(); scan_for_suspended_buildings();
show_suspended_buildings(); show_suspended_buildings();
} }