Bazaar developer reference

CvLuaFractal::pRegister(lua_State *)

Defined in
Lua/CvLuaFractal.cpp, line 72
Class
CvLuaFractal
Hook name
CivHooks::CvLuaFractal_pRegister

Hooks

static bool BeforeCvLuaFractal_pRegister(lua_State* L, int& result);static void AfterCvLuaFractal_pRegister(lua_State* L, int& result);static int ReplaceCvLuaFractal_pRegister(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaFractal_pRegister>(host, &BeforeCvLuaFractal_pRegister);CivRegisterAfter<CivHooks::CvLuaFractal_pRegister>(host, &AfterCvLuaFractal_pRegister);CivRegisterReplace<CivHooks::CvLuaFractal_pRegister>(host, &ReplaceCvLuaFractal_pRegister);

Code

72int CvLuaFractal::pRegister(lua_State* L)73{74	lua_getglobal(L, "Fractal");75	if(lua_isnil(L, -1))76	{77		lua_pop(L, 1);78		lua_createtable(L, 0, 3);79		lua_pushvalue(L, -1);80		lua_setglobal(L, "Fractal");81	}8283	lua_pushcclosure(L, lCreate, 0);84	lua_setfield(L, -2, "Create");8586	lua_pushcclosure(L, lCreateRifts, 0);87	lua_setfield(L, -2, "CreateRifts");8889	return 0;90}

Calls

Called by