MCPcopy Create free account
hub / github.com/DFHack/dfhack / cbEnumJobOutputs

Function cbEnumJobOutputs

plugins/workflow.cpp:906–924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

904}
905
906static 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
926static void map_job_constraints(color_ostream &out)
927{

Callers

nothing calls this directly

Calls 5

lua_touserdataFunction · 0.85
lua_settopFunction · 0.85
CheckDFAssignFunction · 0.85
link_job_constraintFunction · 0.85
lua_tobooleanFunction · 0.85

Tested by

no test coverage detected