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

Method do_render

library/modules/Screen.cpp:935–951  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

933}
934
935int dfhack_lua_viewscreen::do_render(lua_State *L)
936{
937 auto self = get_self(L);
938 if (!self) return 0;
939
940 lua_getfield(L, -1, "onRender");
941
942 if (lua_isnil(L, -1))
943 {
944 Screen::clear();
945 return 0;
946 }
947
948 lua_pushvalue(L, -2);
949 lua_call(L, 1, 0);
950 return 0;
951}
952
953int dfhack_lua_viewscreen::do_notify(lua_State *L)
954{

Callers

nothing calls this directly

Calls 3

lua_getfieldFunction · 0.85
lua_pushvalueFunction · 0.85
clearFunction · 0.50

Tested by

no test coverage detected