| 904 | } |
| 905 | |
| 906 | static int cbEnumJobOutputs(lua_State *L) |
| 907 | { |
| 908 | auto pj = (ProtectedJob*)lua_touserdata(L, lua_upvalueindex(1)); |
| 909 | |
| 910 | lua_settop(L, 6); |
| 911 | |
| 912 | df::dfhack_material_category mat_mask; |
| 913 | if (!lua_isnil(L, 3)) |
| 914 | Lua::CheckDFAssign(L, &mat_mask, 3); |
| 915 | |
| 916 | link_job_constraint( |
| 917 | pj, |
| 918 | (df::item_type)luaL_optint(L, 1, -1), luaL_optint(L, 2, -1), |
| 919 | mat_mask, luaL_optint(L, 4, -1), luaL_optint(L, 5, -1), |
| 920 | lua_toboolean(L, 6) |
| 921 | ); |
| 922 | |
| 923 | return 0; |
| 924 | } |
| 925 | |
| 926 | static void map_job_constraints(color_ostream &out) |
| 927 | { |
nothing calls this directly
no test coverage detected