Aussie_Lurker
Deity
Hi guys. I'm trying to design a modification that makes Buildings dependent on certain terrain within a City-Radius (like Mountains, Forests & Jungle)-using similar code that used to restrict the building of Harbors or Levees. So, modifying CvInfos went fine, but when I tried to change the code in CvCity, it went totally pear-shaped.
Here is the code from CvCity that controls the construction of Feature dependent buildings:
So the problem with my changes is that Mountains, Forests & Jungle aren't defined in CvPlot. Yet I couldn't find how to add these features into CvPlot.
So my question is: how can I add isMountain, isJungle & isForests to CvPlots?
Thanks in advance guys
.
Aussie.
Here is the code from CvCity that controls the construction of Feature dependent buildings:
Code:
if (GC.getBuildingInfo(eBuilding).isWater())
{
if (!GC.getBuildingInfo(eBuilding).isRiver() || !plot()->isRiver())
{
if (!isCoastal(GC.getBuildingInfo(eBuilding).getMinAreaSize()))
{
return false;
}
}
}
else
{
if (area()->getNumTiles() < GC.getBuildingInfo(eBuilding).getMinAreaSize())
{
return false;
}
if (GC.getBuildingInfo(eBuilding).isRiver())
{
if (!(plot()->isRiver()))
{
return false;
}
}
}
return true;
}
So the problem with my changes is that Mountains, Forests & Jungle aren't defined in CvPlot. Yet I couldn't find how to add these features into CvPlot.
So my question is: how can I add isMountain, isJungle & isForests to CvPlots?
Thanks in advance guys

Aussie.