2013 fall patch tiny request (for mods)

bc1

Joined
Jan 12, 2004
Messages
1,311
Would it please :please: be possible expose to LUA mods an existing feature of the game: knowledge of which plot belongs to which city (note: it is already possible to set plot city ownership via plot:SetOwner(iPlayer,iCity,...), but reading it is currently not possible).

Here would be the code to add in CvLuaPlot.cpp.

- in CvLuaPlot::PushMethods:

Method(GetCityPurchaseID);

- at the end of the file:
//------------------------------------------------------------------------------
//int GetCityPurchaseID();
int CvLuaPlot::lGetCityPurchaseID(lua_State* L)
{
return BasicLuaMethod(L, &CvPlot::GetCityPurchaseID);
}
 
Back
Top Bottom