mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
fix: missing Random:seed method
This commit is contained in:
parent
1f3b7f828d
commit
1350910d28
3 changed files with 21 additions and 6 deletions
|
|
@ -22,7 +22,7 @@ static int l_random(lua::State* L) {
|
|||
}
|
||||
}
|
||||
|
||||
static int l_generate(lua::State* L) {
|
||||
static int l_bytes(lua::State* L) {
|
||||
size_t size = lua::tointeger(L, 1);
|
||||
|
||||
auto randomEngine = util::seeded_random_engine(random_device);
|
||||
|
|
@ -40,7 +40,7 @@ static int l_uuid(lua::State* L) {
|
|||
|
||||
const luaL_Reg randomlib[] = {
|
||||
{"random", lua::wrap<l_random>},
|
||||
{"bytes", lua::wrap<l_generate>},
|
||||
{"bytes", lua::wrap<l_bytes>},
|
||||
{"uuid", lua::wrap<l_uuid>},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue