Could someone tell me the purpose of the following change to the EventManager?
I am interested for several reasons:
1 - trying to figure out Python and modding practice
2 - the commented out line didn't seem to do anything, as the event is OnGameStart so isn't the year the start year to begin with? But it seemed to do something as you found it necessary to remove it.
3 - It kinda violates Dr. Jiggle's event management as it goes into the EventManager code directly. Would it be better to just create a new function without that line and override the event. That way no change to CvEventManager would be necessary.
Code:
## HOF MOD V1.61.001
## if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR")):
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)
## above section unindented once
## end HOF MOD V1.61.001
I am interested for several reasons:
1 - trying to figure out Python and modding practice
2 - the commented out line didn't seem to do anything, as the event is OnGameStart so isn't the year the start year to begin with? But it seemed to do something as you found it necessary to remove it.
3 - It kinda violates Dr. Jiggle's event management as it goes into the EventManager code directly. Would it be better to just create a new function without that line and override the event. That way no change to CvEventManager would be necessary.