move lua Rng wrapper to the lua kernel base

This commit is contained in:
Chris Beck 2014-11-20 16:58:12 -05:00
parent e18cfd7049
commit e89383d1aa
2 changed files with 5 additions and 5 deletions

View File

@ -32,6 +32,7 @@
#include "scripting/lua_fileops.hpp"
#include "scripting/lua_gui2.hpp"
#include "scripting/lua_map_location_ops.hpp"
#include "scripting/lua_rng.hpp"
#include "scripting/lua_types.hpp"
#include "version.hpp" // for do_version_check, etc
@ -338,6 +339,10 @@ lua_kernel_base::lua_kernel_base(CVideo * video)
luaL_setfuncs(L, map_callbacks, 0);
lua_setfield(L, -2, "map_location");
lua_pop(L,1);
// Add mersenne twister rng wrapper
cmd_log_ << "Adding rng tables...\n";
lua_rng::load_tables(L);
}
lua_kernel_base::~lua_kernel_base()

View File

@ -36,11 +36,6 @@ mapgen_lua_kernel::mapgen_lua_kernel()
: lua_kernel_base(NULL)
{
lua_State *L = mState;
// Add mersenne twister rng wrapper
cmd_log_ << "Adding mt19937 metatable...\n";
lua_rng::load_tables(L);
lua_settop(L, 0);
}