Beispiel #1
0
    def onBuildingBuilt(self, argsList):
        'Building Completed'
        pCity, iBuildingType = argsList
        game = gc.getGame()
        if ((not gc.getGame().isNetworkMultiPlayer())
                and (pCity.getOwner() == gc.getGame().getActivePlayer())
                and isWorldWonderClass(
                    gc.getBuildingInfo(iBuildingType).getBuildingClassType())):
            # If this is a wonder...
            popupInfo = CyPopupInfo()
            popupInfo.setButtonPopupType(
                ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
            popupInfo.setData1(iBuildingType)
            popupInfo.setData2(pCity.getID())
            popupInfo.setData3(0)
            popupInfo.setText(u"showWonderMovie")
            popupInfo.addPopup(pCity.getOwner())

        CvAdvisorUtils.buildingBuiltFeats(pCity, iBuildingType)

        if (not self.__LOG_BUILDING):
            return
        CvUtil.pyPrint('%s was finished by Player %d Civilization %s' %
                       (PyInfo.BuildingInfo(iBuildingType).getDescription(),
                        pCity.getOwner(), gc.getPlayer(
                            pCity.getOwner()).getCivilizationDescription(0)))
Beispiel #2
0
	def onBuildingBuilt(self, argsList):
		'Building Completed'
		pCity, iBuildingType = argsList

		CvAdvisorUtils.buildingBuiltFeats(pCity, iBuildingType)

		if (not self.__LOG_BUILDING):
			return
		CvUtil.pyPrint('%s was finished by Player %d Civilization %s'
			%(gc.getBuildingInfo(iBuildingType).getDescription(), pCity.getOwner(), gc.getPlayer(pCity.getOwner()).getCivilizationDescription(0)))
Beispiel #3
0
	def onBuildingBuilt(self, argsList):
		'Building Completed'
		pCity, iBuildingType = argsList
		game = gc.getGame()
		if ((not gc.getGame().isNetworkMultiPlayer()) and (pCity.getOwner() == gc.getGame().getActivePlayer()) and isWorldWonderClass(gc.getBuildingInfo(iBuildingType).getBuildingClassType())):
			# If this is a wonder...
			popupInfo = CyPopupInfo()
			popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
			popupInfo.setData1(iBuildingType)
			popupInfo.setData2(pCity.getID())
			popupInfo.setData3(0)
			popupInfo.setText(u"showWonderMovie")
			popupInfo.addPopup(pCity.getOwner())

		CvAdvisorUtils.buildingBuiltFeats(pCity, iBuildingType)

		if (not self.__LOG_BUILDING):
			return
		CvUtil.pyPrint('%s was finished by Player %d Civilization %s'
			%(PyInfo.BuildingInfo(iBuildingType).getDescription(), pCity.getOwner(), gc.getPlayer(pCity.getOwner()).getCivilizationDescription(0)))
    def onBuildingBuilt(self, argsList):
        'Building Completed'
        pCity, iBuildingType = argsList
        game = gc.getGame()
        ## The Duomo-pyramids new effect keldath change Start ##
        #		if iBuildingType == gc.getInfoTypeForString("BUILDING_PYRAMID"):
        #			pPlayer = gc.getPlayer(pCity.getOwner())
        #			iStateReligion = pPlayer.getStateReligion()
        #			for iPlayerX in range(gc.getMAX_CIV_PLAYERS()):
        #				pPlayerX = gc.getPlayer(iPlayerX)
        #				(loopCity, iter) = pPlayerX.firstCity(false)
        #				while(loopCity):
        #					if loopCity.isHasReligion(iStateReligion):
        #						loopCity.changeCulture(iPlayerX, loopCity.getCultureThreshold() /5, true)
        #					(loopCity, iter) = pPlayerX.nextCity(iter, false)
        #			CyInterface().addImmediateMessage(CyTranslator().getText("TXT_KEY_BUILDING_PYRAMID",(gc.getReligionInfo(iStateReligion).getDescription(),)), None)
        ## The Duomo End ##
        if ((not gc.getGame().isNetworkMultiPlayer())
                and (pCity.getOwner() == gc.getGame().getActivePlayer())
                and isWorldWonderClass(
                    gc.getBuildingInfo(iBuildingType).getBuildingClassType())):
            # If this is a wonder...
            popupInfo = CyPopupInfo()
            popupInfo.setButtonPopupType(
                ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
            popupInfo.setData1(iBuildingType)
            popupInfo.setData2(pCity.getID())
            popupInfo.setData3(0)
            popupInfo.setText(u"showWonderMovie")
            popupInfo.addPopup(pCity.getOwner())

        CvAdvisorUtils.buildingBuiltFeats(pCity, iBuildingType)

        if (not self.__LOG_BUILDING):
            return
        CvUtil.pyPrint('%s was finished by Player %d Civilization %s' %
                       (PyInfo.BuildingInfo(iBuildingType).getDescription(),
                        pCity.getOwner(), gc.getPlayer(
                            pCity.getOwner()).getCivilizationDescription(0)))