| 1886 | } |
| 1887 | |
| 1888 | DFhackCExport command_result plugin_onupdate(color_ostream &out) |
| 1889 | { |
| 1890 | // static int step_count = 0; |
| 1891 | // check run conditions |
| 1892 | if (!initialized || !world || !world->map.block_index || !enable_labormanager) |
| 1893 | { |
| 1894 | // give up if we shouldn't be running' |
| 1895 | return CR_OK; |
| 1896 | } |
| 1897 | |
| 1898 | // if (++step_count < 60) |
| 1899 | // return CR_OK; |
| 1900 | |
| 1901 | if (*df::global::process_jobs) |
| 1902 | return CR_OK; |
| 1903 | |
| 1904 | // step_count = 0; |
| 1905 | |
| 1906 | debug_stream = &out; |
| 1907 | AutoLaborManager alm(out); |
| 1908 | alm.process(); |
| 1909 | |
| 1910 | return CR_OK; |
| 1911 | } |
| 1912 | |
| 1913 | void print_labor(df::unit_labor labor, color_ostream &out) |
| 1914 | { |