Hooks
static bool BeforeCvLuaGame_lCyclePlotUnits(lua_State* L, int& result);static void AfterCvLuaGame_lCyclePlotUnits(lua_State* L, int& result);static int ReplaceCvLuaGame_lCyclePlotUnits(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lCyclePlotUnits>(host, &BeforeCvLuaGame_lCyclePlotUnits);CivRegisterAfter<CivHooks::CvLuaGame_lCyclePlotUnits>(host, &AfterCvLuaGame_lCyclePlotUnits);CivRegisterReplace<CivHooks::CvLuaGame_lCyclePlotUnits>(host, &ReplaceCvLuaGame_lCyclePlotUnits);
Code
496// bool cyclePlotUnits(CyPlot* pPlot, bool bForward, bool bAuto, int iCount);497int CvLuaGame::lCyclePlotUnits(lua_State* L)498{499 CvPlot* pkPlot = CvLuaPlot::GetInstance(L, 1);500 const bool bForward = lua_toboolean(L, 2);501 const bool bAuto = lua_toboolean(L, 3);502 const int iCount = lua_tointeger(L, 4);503504 const bool bResult = GetInstance()->cyclePlotUnits(pkPlot, bForward, bAuto, iCount);505 lua_pushboolean(L, bResult);506 return 1;507}