mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Minor script api fixes/cleanups
This commit is contained in:
@@ -1061,17 +1061,7 @@ int ModApiEnvMod::l_get_perlin_map(lua_State *L)
|
||||
// returns voxel manipulator
|
||||
int ModApiEnvMod::l_get_voxel_manip(lua_State *L)
|
||||
{
|
||||
GET_ENV_PTR;
|
||||
|
||||
Map *map = &(env->getMap());
|
||||
LuaVoxelManip *o = (lua_istable(L, 1) && lua_istable(L, 2)) ?
|
||||
new LuaVoxelManip(map, read_v3s16(L, 1), read_v3s16(L, 2)) :
|
||||
new LuaVoxelManip(map);
|
||||
|
||||
*(void **)(lua_newuserdata(L, sizeof(void *))) = o;
|
||||
luaL_getmetatable(L, "VoxelManip");
|
||||
lua_setmetatable(L, -2);
|
||||
return 1;
|
||||
return LuaVoxelManip::create_object(L);
|
||||
}
|
||||
|
||||
// clear_objects([options])
|
||||
|
Reference in New Issue
Block a user