small lua fix
This commit is contained in:
parent
39832233bb
commit
40987f16b6
@ -14,6 +14,14 @@
|
|||||||
#include "../../lighting/Lighting.h"
|
#include "../../lighting/Lighting.h"
|
||||||
#include "../../logic/BlocksController.h"
|
#include "../../logic/BlocksController.h"
|
||||||
|
|
||||||
|
#if (LUA_VERSION_NUM < 503 and not defined(LUAJIT_VERSION))
|
||||||
|
static void luaL_openlib(lua_State* L, const char* name, const luaL_Reg* libfuncs) {
|
||||||
|
lua_newtable(L);
|
||||||
|
luaL_setfuncs(L, libfuncs, 0);
|
||||||
|
lua_setglobal(L, name);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* == world library ==*/
|
/* == world library ==*/
|
||||||
static int l_world_get_day_time(lua_State* L) {
|
static int l_world_get_day_time(lua_State* L) {
|
||||||
lua_pushnumber(L, scripting::level->world->daytime);
|
lua_pushnumber(L, scripting::level->world->daytime);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user