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

Function findConstraint

plugins/workflow.cpp:1461–1475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1459}
1460
1461static int findConstraint(lua_State *L)
1462{
1463 auto token = luaL_checkstring(L, 1);
1464
1465 color_ostream &out = *Lua::GetOutput(L);
1466 update_data_structures(out);
1467
1468 ItemConstraint *icv = get_constraint(out, token, NULL, false);
1469
1470 if (icv)
1471 push_constraint(L, icv);
1472 else
1473 lua_pushnil(L);
1474 return 1;
1475}
1476
1477static int setConstraint(lua_State *L)
1478{

Callers

nothing calls this directly

Calls 4

update_data_structuresFunction · 0.85
get_constraintFunction · 0.85
push_constraintFunction · 0.85
lua_pushnilFunction · 0.85

Tested by

no test coverage detected