Beispiel #1
0
	def onCityLost(self, argsList):
		'City Lost'
		city = argsList[0]
		player = PyPlayer(city.getOwner())

		CvUtil.pyPrint('City %s was lost by Player %d Civilization %s'
			%(city.getName(), player.getID(), player.getCivilizationName()))
Beispiel #2
0
	def onGreatPersonBorn(self, argsList):
		'Unit Promoted'
		pUnit, iPlayer, pCity = argsList
		player = PyPlayer(iPlayer)
		if pUnit.isNone() or pCity.isNone():
				return

		CvUtil.pyPrint('A %s was born for %s in %s' %(pUnit.getName(), player.getCivilizationName(), pCity.getName()))
Beispiel #3
0
	def onReligionFounded(self, argsList):
		'Religion Founded'

		iReligion, iFounder = argsList
		player = PyPlayer(iFounder)

		CvUtil.pyPrint('Player %d Civilization %s has founded %s'
			%(iFounder, player.getCivilizationName(), gc.getReligionInfo(iReligion).getDescription()))
Beispiel #4
0
	def setName( self ) :

		popup = PyPopup.PyPopup(RevDefs.setNamePopup,contextType = EventContextTypes.EVENTCONTEXT_ALL)
		popup.setBodyString( 'Change name of a civ' )
		popup.addSeparator()

		popup.createPythonEditBox( 'Name', 'New name for player, eg jdog5000', 0)
		popup.createPythonEditBox( 'Desc', 'New name for civ, eg American Empire', 1)
		popup.createPythonEditBox( 'Short', 'New name for civ, eg America', 2)
		popup.createPythonEditBox( 'Adj', 'New name for civ, eg American', 3)

		popup.createPythonPullDown( 'This AI Player', 1 )
		for i in range(0,gc.getMAX_CIV_PLAYERS()) :
			player = PyPlayer(i)
			if( not player.isNone() ) :
				if( player.isAlive() ) :
					popup.addPullDownString( "%s of the %s"%(player.getName(),player.getCivilizationName()), i, 1 )

		popup.addButton('None')
		CvUtil.pyPrint('Launching pick human popup')
		popup.launch()
Beispiel #5
0
    def setName(self):

        popup = PyPopup.PyPopup(RevDefs.setNamePopup, contextType=EventContextTypes.EVENTCONTEXT_ALL)
        popup.setBodyString("Change name of a civ")
        popup.addSeparator()

        popup.createPythonEditBox("Name", "New name for player, eg jdog5000", 0)
        popup.createPythonEditBox("Desc", "New name for civ, eg American Empire", 1)
        popup.createPythonEditBox("Short", "New name for civ, eg America", 2)
        popup.createPythonEditBox("Adj", "New name for civ, eg American", 3)

        popup.createPythonPullDown("This AI Player", 1)
        for i in range(0, gc.getMAX_CIV_PLAYERS()):
            player = PyPlayer(i)
            if not player.isNone():
                if player.isAlive():
                    popup.addPullDownString("%s of the %s" % (player.getName(), player.getCivilizationName()), i, 1)

        popup.addButton("None")
        CvUtil.pyPrint("Launching pick human popup")
        popup.launch()