CvLuaCity::lSetName(lua_State *)
- Defined in
- Lua/CvLuaCity.cpp, line 3408
- Class
- CvLuaCity
- Hook name
CivHooks::CvLuaCity_lSetName
Hooks
static bool BeforeCvLuaCity_lSetName(lua_State* L, int& result);static void AfterCvLuaCity_lSetName(lua_State* L, int& result);static int ReplaceCvLuaCity_lSetName(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lSetName>(host, &BeforeCvLuaCity_lSetName);CivRegisterAfter<CivHooks::CvLuaCity_lSetName>(host, &AfterCvLuaCity_lSetName);CivRegisterReplace<CivHooks::CvLuaCity_lSetName>(host, &ReplaceCvLuaCity_lSetName);
Code
3407//void SetName(string szNewValue, bool bFound);3408int CvLuaCity::lSetName(lua_State* L)3409{3410 CvCity* pkCity = GetInstance(L);34113412 const char* cityName = lua_tostring(L, 2);3413 const bool bFound = luaL_optbool(L, 3, false);34143415 pkCity->setName(cityName, bFound);3416 return 0;3417}
Calls
- CvCity::setName(const char *, bool)
CvLuaScopedInstance::GetInstancelua_tolstring- luaL_optbool(lua_State *, int, bool)