Where to mod to enable razing capitals and city states ?

this is the code in the cityview none altered or changed

-------------------------------------------
-- Raze City Button (Occupied Cities only)
-------------------------------------------

if (not pCity:IsOccupied() or pCity:IsRazing()) then
g_bRazeButtonDisabled = true;
Controls.RazeCityButton:SetHide(true);
else
g_bRazeButtonDisabled = false;
Controls.RazeCityButton:SetHide(false);
Controls.RazeCityButton:SetDisabled(false);
Controls.RazeCityButton:SetToolTipString( Locale.ConvertTextKey( "TXT_KEY_CITYVIEW_RAZE_BUTTON_TT" ) );
end

-- Stop city razing
if (pCity:IsRazing()) then
g_bRazeButtonDisabled = false;
Controls.UnrazeCityButton:SetHide(false);
else
g_bRazeButtonDisabled = true;
Controls.UnrazeCityButton:SetHide(true);
end
 
PlayerCanRaze is not a standard event, but an extension from my DLL
 
in the source files comes with the Tool kit

I found - in file called CvLuaPlayer.cpp

//bool canRaze(CyCity* pCity);
int CvLuaPlayer::lCanRaze(lua_State* L)
{
CvPlayerAI* pkPlayer = GetInstance(L);
CvCity* pkCity = CvLuaCity::GetInstance(L, 2);
bool bIgnoreCapitals = luaL_optbool(L, 3, false);

const bool bResult = pkPlayer->canRaze(pkCity, bIgnoreCapitals);
lua_pushboolean(L, bResult);
return 1;
}

I am wondering if the bIgnoreCapitals has anything to do with it ?
 
Top Bottom