MCPcopy Create free account
hub / github.com/DFHack/dfhack / dfhack_random_new

Function dfhack_random_new

library/LuaApi.cpp:1134–1143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1132}
1133
1134static int dfhack_random_new(lua_State *L)
1135{
1136 Lua::make_lua_userdata<MersenneRNG>(L);
1137
1138 lua_rawgetp(L, LUA_REGISTRYINDEX, &DFHACK_RANDOM_TOKEN);
1139 lua_setmetatable(L, -2);
1140
1141 lua_insert(L, 1);
1142 return dfhack_random_init(L);
1143}
1144
1145static int dfhack_random_random(lua_State *L)
1146{

Callers

nothing calls this directly

Calls 3

lua_rawgetpFunction · 0.85
lua_setmetatableFunction · 0.85
dfhack_random_initFunction · 0.85

Tested by

no test coverage detected