| 1987 | |
| 1988 | |
| 1989 | static int Set_GfxBlock(lua_State* L, GfxBlock& gfxBlock) { |
| 1990 | EventClient* ec = L2H(L); |
| 1991 | if ((ec == luaUser) && gfxBlock.worldBlock()) { |
| 1992 | return luaL_pushnil(L); |
| 1993 | } |
| 1994 | luaL_checktype(L, 2, LUA_TBOOLEAN); |
| 1995 | const bool block = lua_tobool(L, 2); |
| 1996 | if (!block) { |
| 1997 | gfxBlock.remove(ec); |
| 1998 | return luaL_pushnil(L); |
| 1999 | } |
| 2000 | const bool queue = lua_isboolean(L, 3) && lua_tobool(L, 3); |
| 2001 | lua_pushboolean(L, gfxBlock.set(ec, queue)); |
| 2002 | return 1; |
| 2003 | } |
| 2004 | |
| 2005 | |
| 2006 | int LuaCallOuts::SetGfxBlock(lua_State* L) { |
no test coverage detected