if(GC.getUSE_CAN_TRAIN_CALLBACK(eUnit))
{
PYTHON_ACCESS_LOCK_SCOPE
PROFILE("canTrain.Python");
CyCity* pyCity = new CyCity((CvCity*)this);
CyArgsList argsList;
argsList.add(gDLL->getPythonIFace()->makePythonObject(pyCity)); // pass in city class
argsList.add(eUnit);
argsList.add(bContinue);
argsList.add(bTestVisible);
argsList.add(bIgnoreCost);
argsList.add(bIgnoreUpgrades);
long lResult=0;
PYTHON_CALL_FUNCTION4(__FUNCTION__, PYGameModule, "canTrain", argsList.makeFunctionArgs(), &lResult);
delete pyCity; // python fxn must not hold on to this pointer
if (lResult == 1)
{
return true;
}
}
bool bConquestCanRaze = false;
if (bConquest)
{
PYTHON_ACCESS_LOCK_SCOPE
CyCity* pyCity = new CyCity(pNewCity);
CyArgsList argsList;
argsList.add(getID()); // Player ID
argsList.add(gDLL->getPythonIFace()->makePythonObject(pyCity)); // pass in city class
long lResult=0;
PYTHON_CALL_FUNCTION4(__FUNCTION__, PYGameModule, "canRazeCity", argsList.makeFunctionArgs(), &lResult);
delete pyCity; // python fxn must not hold on to this pointer
if (lResult == 1)
{
bConquestCanRaze = true;
}
}
void CvCity::doTurnBeginProcessing()
{
PROFILE_FUNC();
FAssert(m_deferringBonusProcessingCount == 0);
// Allow the player to determine the type of conscripted units
{
PYTHON_ACCESS_LOCK_SCOPE
long lConscriptUnit;
CyArgsList argsList;
argsList.add(getOwnerINLINE()); // pass in player
lConscriptUnit = -1;
PYTHON_CALL_FUNCTION4(__FUNCTION__, PYGameModule, "getConscriptUnitType", argsList.makeFunctionArgs(),&lConscriptUnit);
m_eConscriptUnitType = (lConscriptUnit == -1 ? NO_UNIT : (UnitTypes)lConscriptUnit);
}
[/
spoiler]
over to CvGameInterface which does nothing excpet bounces call to BugGameUtils then to CvGameUtils to be handled. code that tells the dll not to skip the following c++ is then sent back the same way