CvLuaPlot::lSetTerrainType(lua_State *)
- Defined in
- Lua/CvLuaPlot.cpp, line 479
- Class
- CvLuaPlot
- Hook name
CivHooks::CvLuaPlot_lSetTerrainType
Hooks
static bool BeforeCvLuaPlot_lSetTerrainType(lua_State* L, int& result);static void AfterCvLuaPlot_lSetTerrainType(lua_State* L, int& result);static int ReplaceCvLuaPlot_lSetTerrainType(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlot_lSetTerrainType>(host, &BeforeCvLuaPlot_lSetTerrainType);CivRegisterAfter<CivHooks::CvLuaPlot_lSetTerrainType>(host, &AfterCvLuaPlot_lSetTerrainType);CivRegisterReplace<CivHooks::CvLuaPlot_lSetTerrainType>(host, &ReplaceCvLuaPlot_lSetTerrainType);
Code
479int CvLuaPlot::lSetTerrainType(lua_State* L)480{481 CvPlot* pkPlot = GetInstance(L);482483 const int terrainType = lua_tointeger(L, 2);484 const bool bRecalculate = lua_toboolean(L, 3);485 const bool bRebuildGraphics = lua_toboolean(L, 4);486487 pkPlot->setTerrainType((TerrainTypes)terrainType, bRecalculate, bRebuildGraphics);488489 return 0;490}
Calls
CvLuaScopedInstance::GetInstance- CvPlot::setTerrainType(TerrainTypes, bool, bool)
lua_tobooleanlua_tointeger