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

Function OpenRandom

library/LuaApi.cpp:1257–1267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1255};
1256
1257static void OpenRandom(lua_State *state)
1258{
1259 luaL_getsubtable(state, lua_gettop(state), "random");
1260
1261 lua_dup(state);
1262 lua_rawsetp(state, LUA_REGISTRYINDEX, &DFHACK_RANDOM_TOKEN);
1263
1264 luaL_setfuncs(state, dfhack_random_funcs, 0);
1265
1266 lua_pop(state, 1);
1267}
1268
1269
1270/*********************************

Callers 1

OpenDFHackApiFunction · 0.85

Calls 5

luaL_getsubtableFunction · 0.85
lua_gettopFunction · 0.85
lua_dupFunction · 0.85
lua_rawsetpFunction · 0.85
luaL_setfuncsFunction · 0.85

Tested by

no test coverage detected