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

Function gui_revealInDwarfmodeMap

library/LuaApi.cpp:1781–1814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1779}
1780
1781static int gui_revealInDwarfmodeMap(lua_State *state)
1782{
1783 bool rv;
1784 df::coord p;
1785
1786 switch (lua_gettop(state))
1787 {
1788 default:
1789 case 5:
1790 rv = Gui::revealInDwarfmodeMap(CheckCoordXYZ(state, 1, false), lua_toboolean(state, 4), lua_toboolean(state, 5));
1791 break;
1792 case 4:
1793 rv = Gui::revealInDwarfmodeMap(CheckCoordXYZ(state, 1, false), lua_toboolean(state, 4));
1794 break;
1795 case 3:
1796 if (lua_isboolean(state, 3)) {
1797 Lua::CheckDFAssign(state, &p, 1);
1798 rv = Gui::revealInDwarfmodeMap(p, lua_toboolean(state, 2), lua_toboolean(state, 3));
1799 }
1800 else
1801 rv = Gui::revealInDwarfmodeMap(CheckCoordXYZ(state, 1, false));
1802 break;
1803 case 2:
1804 Lua::CheckDFAssign(state, &p, 1);
1805 rv = Gui::revealInDwarfmodeMap(p, lua_toboolean(state, 2));
1806 break;
1807 case 1:
1808 Lua::CheckDFAssign(state, &p, 1);
1809 rv = Gui::revealInDwarfmodeMap(p);
1810 }
1811
1812 lua_pushboolean(state, rv);
1813 return 1;
1814}
1815
1816static df::widget * get_one_widget(lua_State *L, int32_t idx, df::widget_container *container) {
1817 if (lua_isinteger(L, idx))

Callers

nothing calls this directly

Calls 6

lua_gettopFunction · 0.85
revealInDwarfmodeMapFunction · 0.85
CheckCoordXYZFunction · 0.85
lua_tobooleanFunction · 0.85
CheckDFAssignFunction · 0.85
lua_pushbooleanFunction · 0.85

Tested by

no test coverage detected