Skip to content

Commit

Permalink
move lua Rng wrapper to the lua kernel base
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Nov 20, 2014
1 parent e18cfd7 commit e89383d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/scripting/lua_kernel_base.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
5 changes: 0 additions & 5 deletions src/scripting/mapgen_lua_kernel.cpp
Expand Up @@ -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);
}

Expand Down

0 comments on commit e89383d

Please sign in to comment.