|
|
@ -29,7 +29,7 @@ using df::global::world;
|
|
|
|
|
|
|
|
|
|
|
|
#define ARRAY_COUNT(array) (sizeof(array)/sizeof((array)[0]))
|
|
|
|
#define ARRAY_COUNT(array) (sizeof(array)/sizeof((array)[0]))
|
|
|
|
|
|
|
|
|
|
|
|
static int enable_autolabor;
|
|
|
|
static int enable_autolabor = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Here go all the command declarations...
|
|
|
|
// Here go all the command declarations...
|
|
|
@ -467,9 +467,12 @@ struct values_sorter
|
|
|
|
DFhackCExport command_result plugin_onupdate ( color_ostream &out )
|
|
|
|
DFhackCExport command_result plugin_onupdate ( color_ostream &out )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
static int step_count = 0;
|
|
|
|
static int step_count = 0;
|
|
|
|
|
|
|
|
// check run conditions
|
|
|
|
if (!enable_autolabor)
|
|
|
|
if(!world->map.block_index || !enable_autolabor)
|
|
|
|
return CR_OK;
|
|
|
|
{
|
|
|
|
|
|
|
|
// give up if we shouldn't be running'
|
|
|
|
|
|
|
|
return CR_OK;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (++step_count < 60)
|
|
|
|
if (++step_count < 60)
|
|
|
|
return CR_OK;
|
|
|
|
return CR_OK;
|
|
|
|