def onGameStart(self, argsList): 'Called at the start of the game' #Rhye - dawn of map must appear in late starts too #if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR") and not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_START)): if (gc.getGame().getStartEra() == gc.getDefineINT("STANDARD_ERA") or gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_START)): for iPlayer in range(gc.getMAX_PLAYERS()): player = gc.getPlayer(iPlayer) if (player.isAlive() and player.isHuman()): popupInfo = CyPopupInfo() popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN) popupInfo.setText(u"showDawnOfMan") popupInfo.addPopup(iPlayer) else: CyInterface().setSoundSelectionReady(true) if gc.getGame().isPbem(): for iPlayer in range(gc.getMAX_PLAYERS()): player = gc.getPlayer(iPlayer) if (player.isAlive() and player.isHuman()): popupInfo = CyPopupInfo() popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_DETAILS) popupInfo.setOption1(true) popupInfo.addPopup(iPlayer) CvAdvisorUtils.resetNoLiberateCities()
def onGameStart(self, argsList): 'Called at the start of the game' if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR") and not gc.getGame().isOption( GameOptionTypes.GAMEOPTION_ADVANCED_START) and not gc.getGame().isOption( GameOptionTypes.GAMEOPTION_RISE_FALL)): for iPlayer in range(gc.getMAX_PLAYERS()): player = gc.getPlayer(iPlayer) if (player.isAlive() and player.isHuman()): popupInfo = CyPopupInfo() popupInfo.setButtonPopupType( ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN) popupInfo.setText(u"showDawnOfMan") popupInfo.addPopup(iPlayer) else: CyInterface().setSoundSelectionReady(true) if gc.getGame().isPbem(): for iPlayer in range(gc.getMAX_PLAYERS()): player = gc.getPlayer(iPlayer) if (player.isAlive() and player.isHuman()): popupInfo = CyPopupInfo() popupInfo.setButtonPopupType( ButtonPopupTypes.BUTTONPOPUP_DETAILS) popupInfo.setOption1(true) popupInfo.addPopup(iPlayer) ###doto starting popup - begin if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR") and not gc.getGame().isOption( GameOptionTypes.GAMEOPTION_ADVANCED_START)): for iPlayer in range(gc.getMAX_PLAYERS()): player = gc.getPlayer(iPlayer) if (player.isAlive() and player.isHuman()): popupInfo = CyPopupInfo() popupInfo.setButtonPopupType( ButtonPopupTypes.BUTTONPOPUP_TEXT) szBody = localText.getText( "TXT_KEY_MOD_HEADER", ()) + "\n\n" + localText.getText( "TXT_KEY_MOD_TEXT", ()) popupInfo.setText(szBody) popupInfo.addPopup(iPlayer) ###starting popup - end # Super Forts CyMap().calculateCanalAndChokePoints() CvAdvisorUtils.resetNoLiberateCities()
def onLoadGame(self, argsList): CvAdvisorUtils.resetNoLiberateCities() return 0