MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getGameStateFromLua

Function getGameStateFromLua

game/state/luagamestate_support.cpp:13–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11{
12
13GameState *getGameStateFromLua(lua_State *L)
14{
15 lua_getfield(L, LUA_REGISTRYINDEX, "OpenApoc.GameState");
16 GameState *r = (GameState *)lua_touserdata(L, -1);
17 lua_pop(L, 1);
18 return r;
19}
20const GameState *getConstGameStateFromLua(lua_State *L)
21{
22 lua_getfield(L, LUA_REGISTRYINDEX, "OpenApoc.GameState");

Calls

no outgoing calls

Tested by

no test coverage detected