diff options
| author | Petr Mrázek | 2012-04-01 03:46:17 +0200 |
|---|---|---|
| committer | Petr Mrázek | 2012-04-01 03:46:17 +0200 |
| commit | 2b4044f3f2996d6d13fffaefca9603f8a1348c55 (patch) | |
| tree | a74ce7a021d8c1ed2e770ace82e7032dfc5c679d /plugins/fastdwarf.cpp | |
| parent | 7ff728b6fcbff9e6e8cfe49b65d0645729e249f8 (diff) | |
| download | dfhack-2b4044f3f2996d6d13fffaefca9603f8a1348c55.tar.gz dfhack-2b4044f3f2996d6d13fffaefca9603f8a1348c55.tar.bz2 dfhack-2b4044f3f2996d6d13fffaefca9603f8a1348c55.tar.xz | |
Tweaks!
Check map presence in autolabor and fastdwarf onupdate() functions
Game state tracking in kittens plugin now respects on/off switch
Diffstat (limited to 'plugins/fastdwarf.cpp')
| -rw-r--r-- | plugins/fastdwarf.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/fastdwarf.cpp b/plugins/fastdwarf.cpp index 87402e42..643a097c 100644 --- a/plugins/fastdwarf.cpp +++ b/plugins/fastdwarf.cpp @@ -23,12 +23,16 @@ DFhackCExport command_result plugin_shutdown ( color_ostream &out ) return CR_OK; } -static int enable_fastdwarf; +static int enable_fastdwarf = false; DFhackCExport command_result plugin_onupdate ( color_ostream &out ) { - if (!enable_fastdwarf) + // check run conditions + if(!world->map.block_index || !enable_fastdwarf) + { + // give up if we shouldn't be running' return CR_OK; + } int32_t race = ui->race_id; int32_t civ = ui->civ_id; |
