so functions are declared in the header but defined in the source file?
//Rhye - start
int tempX = pPlot->getX_INLINE();
int tempY = pPlot->getY_INLINE();
int CvPlayerAI::AI_foundValue(int iX, int iY, int iMinRivalRange, bool bStartingLoc) const
{
CvCity* pNearestCity;
CvArea* pArea;
CvPlot* pPlot;
CvPlot* pLoopPlot;
FeatureTypes eFeature;
BonusTypes eBonus;
ImprovementTypes eBonusImprovement;
bool bHasGoodBonus;
int iOwnedTiles;
int iBadTile;
int iTakenTiles;
int iTeammateTakenTiles;
int iDifferentAreaTile;
int iTeamAreaCities;
int iHealth;
int iValue;
int iTempValue;
int iRange;
int iDX, iDY;
int iI;
bool bIsCoastal;
int iResourceValue = 0;
int iSpecialFood = 0;
int iSpecialFoodPlus = 0;
int iSpecialFoodMinus = 0;
int iSpecialProduction = 0;
int iSpecialCommerce = 0;
bool bNeutralTerritory = true;
int iGreed;
int iNumAreaCities;
pPlot = GC.getMapINLINE().plotINLINE(iX, iY);
int tempX = pPlot->getX_INLINE();
CvTeam.obj : error LNK2019: unresolved external symbol "public: int __thiscall CvHandicapInfo::getResearchPercentByID(enum PlayerTypes)const " (?getResearchPercentByID@CvHandicapInfo@@QBEHW4PlayerTypes@@@Z) referenced in function "public: int __thiscall CvTeam::getResearchCost(enum TechTypes)const " (?getResearchCost@CvTeam@@QBEHW4TechTypes@@@Z)
import Hardship
#....
def onUnitBuilt(self, argsList):
'Unit Completed'
city = argsList[0]
unit = argsList[1]
player = PyPlayer(city.getOwner())
CvAdvisorUtils.unitBuiltFeats(city, unit)
if (not self.__LOG_UNITBUILD):
return
CvUtil.pyPrint('%s was finished by Player %d Civilization %s'
%(PyInfo.UnitInfo(unit.getUnitType()).getDescription(), player.getID(), player.getCivilizationName()))
Hardship.NewUnit(argsList)
def NewUnit(argsList):
homecity = argsList[1]
newguy = argsList[2]
dPopup = PyPopup()
dPopup.setHeaderString("Debug")
dPopup.setBodyString("NewUnit is running")
dPopup.launch()
i_des = gc.getInfoTypeForString('PROMOTION_DESERT_SURVIVALIST')
i_jun = gc.getInfoTypeForString('PROMOTION_JUNGLE_SURVIVALIST')
i_arc = gc.getInfoTypeForString('PROMOTION_ARCTIC_SURVIVALIST')
x = homecity.getX()
y = homecity.getY()
xrange = range(x-1, x+1)
yrange = range(y-1, x+1)
descount = 0
juncount = 0
arccount = 0
for i in xrange:
for j in yrange:
nearplot = cyMap.plot(i, j)
localterrain = nearplot.getTerrainType()
localfeature = nearplot.getFeatureType()
if localterrain == 2:
descount = descount + 1
if localterrain == 3 or localterrain ==4:
arccount = arccount +1
if localfeature == 1:
juncount = juncount + 1
if descount > 3:
newguy.setHasPromotion(i_des , 1)
if juncount > 3:
newguy.setHasPromotion(i_jun, 1)
if arccount > 3:
newguy.setHasPromotion(i_arc, 1)
def onUnitBuilt(self, argsList):
'Unit Completed'
city = argsList[0]
unit = argsList[1]
player = PyPlayer(city.getOwner())
CvAdvisorUtils.unitBuiltFeats(city, unit)
[B] if (not self.__LOG_UNITBUILD):[/B]
return
CvUtil.pyPrint('%s was finished by Player %d Civilization %s'
%(PyInfo.UnitInfo(unit.getUnitType()).getDescription(), player.getID(), player.getCivilizationName()))
Hardship.NewUnit(argsList)
def onUnitBuilt(self, argsList):
'Unit Completed'
city = argsList[0]
unit = argsList[1]
player = PyPlayer(city.getOwner())
CvAdvisorUtils.unitBuiltFeats(city, unit)
[B] Hardship.NewUnit(argsList)[/B]
if (not self.__LOG_UNITBUILD):
return
CvUtil.pyPrint('%s was finished by Player %d Civilization %s'
%(PyInfo.UnitInfo(unit.getUnitType()).getDescription(), player.getID(), player.getCivilizationName()))