|
|
@ -35,7 +35,7 @@
|
|
|
|
#include <df/plotinfost.h>
|
|
|
|
#include <df/plotinfost.h>
|
|
|
|
#include <df/activity_info.h>
|
|
|
|
#include <df/activity_info.h>
|
|
|
|
#include <df/global_objects.h>
|
|
|
|
#include <df/global_objects.h>
|
|
|
|
#include <df/gamest.h>
|
|
|
|
#include <df/gamest_extra.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include <MiscUtils.h>
|
|
|
|
#include <MiscUtils.h>
|
|
|
|
|
|
|
|
|
|
|
@ -51,7 +51,7 @@ using namespace df::enums;
|
|
|
|
DFHACK_PLUGIN("autolabor");
|
|
|
|
DFHACK_PLUGIN("autolabor");
|
|
|
|
REQUIRE_GLOBAL(plotinfo);
|
|
|
|
REQUIRE_GLOBAL(plotinfo);
|
|
|
|
REQUIRE_GLOBAL(world);
|
|
|
|
REQUIRE_GLOBAL(world);
|
|
|
|
REQUIRE_GLOBAL(game);
|
|
|
|
REQUIRE_GLOBAL(game_extra);
|
|
|
|
|
|
|
|
|
|
|
|
#define ARRAY_COUNT(array) (sizeof(array)/sizeof((array)[0]))
|
|
|
|
#define ARRAY_COUNT(array) (sizeof(array)/sizeof((array)[0]))
|
|
|
|
|
|
|
|
|
|
|
@ -414,7 +414,7 @@ static void enable_plugin(color_ostream &out)
|
|
|
|
cleanup_state();
|
|
|
|
cleanup_state();
|
|
|
|
init_state();
|
|
|
|
init_state();
|
|
|
|
|
|
|
|
|
|
|
|
df::global::game->external_flag |= 1; // shut down DF's work detail system
|
|
|
|
df::global::game_extra->external_flag |= 1; // shut down DF's work detail system
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
|
|
|
|
DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
|
|
|
@ -1084,7 +1084,7 @@ DFhackCExport command_result plugin_enable ( color_ostream &out, bool enable )
|
|
|
|
enable_autolabor = false;
|
|
|
|
enable_autolabor = false;
|
|
|
|
setOptionEnabled(CF_ENABLED, false);
|
|
|
|
setOptionEnabled(CF_ENABLED, false);
|
|
|
|
|
|
|
|
|
|
|
|
df::global::game->external_flag &= ~1; // reenable DF's work detail system
|
|
|
|
df::global::game_extra->external_flag &= ~1; // reenable DF's work detail system
|
|
|
|
|
|
|
|
|
|
|
|
out << "Autolabor is disabled." << std::endl;
|
|
|
|
out << "Autolabor is disabled." << std::endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|