void CvMapGenerator::addBonuses() { PROFILE("CvMapGenerator::addBonuses"); gDLL->NiTextOut("Adding Bonuses..."); if (gDLL->getPythonIFace()->callFunction(gDLL->getPythonIFace()->getMapScriptModule(), "addBonuses", NULL)) { if (!gDLL->getPythonIFace()->pythonUsingDefaultImpl()) { return; // Python override } } for (int iOrder = 0; iOrder < GC.getNumBonusInfos(); iOrder++) { for (int iI = 0; iI < GC.getNumBonusInfos(); iI++) { gDLL->callUpdater(); if (GC.getBonusInfo((BonusTypes)iI).getPlacementOrder() == iOrder) { CyArgsList argsList; argsList.add(iI); if (!gDLL->getPythonIFace()->callFunction(gDLL->getPythonIFace()->getMapScriptModule(), "addBonusType", argsList.makeFunctionArgs()) || gDLL->getPythonIFace()->pythonUsingDefaultImpl()) { if (GC.getBonusInfo((BonusTypes)iI).isOneArea()) { addUniqueBonusType((BonusTypes)iI); } else { addNonUniqueBonusType((BonusTypes)iI); } } } } } }
void CvMapGenerator::addBonuses() { PROFILE_FUNC(); gDLL->NiTextOut("Adding Bonuses..."); if (gDLL->getPythonIFace()->pythonAddBonuses() && !gDLL->getPythonIFace()->pythonUsingDefaultImpl()) { return; // Python override } for (int iOrder = 0; iOrder < GC.getNumBonusInfos(); iOrder++) { for (int iI = 0; iI < GC.getNumBonusInfos(); iI++) { gDLL->callUpdater(); if (GC.getBonusInfo((BonusTypes)iI).getPlacementOrder() == iOrder) { if (gDLL->getPythonIFace()->pythonAddBonusType((BonusTypes)iI) && !gDLL->getPythonIFace()->pythonUsingDefaultImpl()) { ; // Python override } else { if (GC.getBonusInfo((BonusTypes)iI).isOneArea()) { addUniqueBonusType((BonusTypes)iI); } else { addNonUniqueBonusType((BonusTypes)iI); } } } } } }