def __init__(self, eventManager): self.EventKeyDown=6 # initialize base class eventManager.addEventHandler("GameStart", self.onGameStart) #Stability eventManager.addEventHandler("BeginGameTurn", self.onBeginGameTurn) #Stability eventManager.addEventHandler("cityAcquired", self.onCityAcquired) #Stability eventManager.addEventHandler("cityRazed", self.onCityRazed) #Stability eventManager.addEventHandler("cityBuilt", self.onCityBuilt) #Stability eventManager.addEventHandler("combatResult", self.onCombatResult) #Stability eventManager.addEventHandler("changeWar", self.onChangeWar) eventManager.addEventHandler("religionFounded",self.onReligionFounded) #Victory eventManager.addEventHandler("buildingBuilt",self.onBuildingBuilt) #Victory eventManager.addEventHandler("projectBuilt",self.onProjectBuilt) #Victory eventManager.addEventHandler("BeginPlayerTurn", self.onBeginPlayerTurn) eventManager.addEventHandler("kbdEvent",self.onKbdEvent) eventManager.addEventHandler("OnLoad",self.onLoadGame) #edead: StoredData eventManager.addEventHandler("techAcquired",self.onTechAcquired) #Stability eventManager.addEventHandler("religionSpread",self.onReligionSpread) #Stability eventManager.addEventHandler("firstContact",self.onFirstContact) eventManager.addEventHandler("OnPreSave",self.onPreSave) #edead: StoredData eventManager.addEventHandler("vassalState", self.onVassalState) eventManager.addEventHandler("revolution", self.onRevolution) eventManager.addEventHandler("cityGrowth", self.onCityGrowth) eventManager.addEventHandler("unitPillage", self.onUnitPillage) eventManager.addEventHandler("cityCaptureGold", self.onCityCaptureGold) eventManager.addEventHandler("playerGoldTrade", self.onPlayerGoldTrade) eventManager.addEventHandler("tradeMission", self.onTradeMission) eventManager.addEventHandler("playerSlaveTrade", self.onPlayerSlaveTrade) eventManager.addEventHandler("playerChangeStateReligion", self.onPlayerChangeStateReligion) #Leoreth eventManager.addEventHandler("greatPersonBorn", self.onGreatPersonBorn) eventManager.addEventHandler("unitCreated", self.onUnitCreated) eventManager.addEventHandler("unitBuilt", self.onUnitBuilt) eventManager.addEventHandler("plotFeatureRemoved", self.onPlotFeatureRemoved) eventManager.addEventHandler("goldenAge", self.onGoldenAge) eventManager.addEventHandler("releasedPlayer", self.onReleasedPlayer) eventManager.addEventHandler("cityAcquiredAndKept", self.onCityAcquiredAndKept) eventManager.addEventHandler("blockade", self.onBlockade) eventManager.addEventHandler("peaceBrokered", self.onPeaceBrokered) self.eventManager = eventManager self.rnf = RiseAndFall.RiseAndFall() self.barb = Barbs.Barbs() self.rel = Religions.Religions() self.res = Resources.Resources() self.up = UniquePowers.UniquePowers() self.aiw = AIWars.AIWars() self.pla = Plague.Plague() self.com = Communications.Communications() self.corp = Companies.Companies() self.dc = DynamicCivs.DynamicCivs()
def __init__(self, eventManager): self.lastRegionID = -1 self.bStabilityOverlay = False self.EventKeyDown = 6 self.EventKeyUp = 7 self.eventManager = eventManager # initialize base class eventManager.addEventHandler("GameStart", self.onGameStart) eventManager.addEventHandler("OnLoad", self.onLoadGame) eventManager.addEventHandler("OnPreSave", self.onPreSave) eventManager.addEventHandler("BeginGameTurn", self.onBeginGameTurn) eventManager.addEventHandler("EndGameTurn", self.onEndGameTurn) eventManager.addEventHandler("BeginPlayerTurn", self.onBeginPlayerTurn) eventManager.addEventHandler("EndPlayerTurn", self.onEndPlayerTurn) eventManager.addEventHandler("firstContact", self.onFirstContact) eventManager.addEventHandler("cityAcquired", self.onCityAcquired) eventManager.addEventHandler("goldenAge", self.onGoldenAge) # srpt eventManager.addEventHandler("corporationSpread", self.onCorporationSpread) # srpt eventManager.addEventHandler("cityAcquiredAndKept", self.onCityAcquiredAndKept) eventManager.addEventHandler("cityRazed", self.onCityRazed) eventManager.addEventHandler("cityBuilt", self.onCityBuilt) eventManager.addEventHandler("combatResult", self.onCombatResult) eventManager.addEventHandler("buildingBuilt", self.onBuildingBuilt) eventManager.addEventHandler("projectBuilt", self.onProjectBuilt) eventManager.addEventHandler("techAcquired", self.onTechAcquired) eventManager.addEventHandler("religionSpread", self.onReligionSpread) eventManager.addEventHandler("unitSpreadReligionAttempt", self.onUnitSpreadReligionAttempt) eventManager.addEventHandler("playerChangeStateReligion", self.onPlayerChangeStateReligion) eventManager.addEventHandler("vassalState", self.onVassalState) eventManager.addEventHandler("changeWar", self.onChangeWar) eventManager.addEventHandler("unitBuilt", self.onUnitBuilt) eventManager.addEventHandler("revolution", self.onRevolution) eventManager.addEventHandler("setPlayerAlive", self.onSetPlayerAlive) eventManager.addEventHandler("greatPersonBorn", self.onGreatPersonBorn) eventManager.addEventHandler("kbdEvent", self.onKbdEvent) self.rnf = RiseAndFall.RiseAndFall() self.cnm = CityNameManager.CityNameManager() self.res = Resources.Resources() self.rel = Religions.Religions() self.barb = Barbs.Barbs() self.aiw = AIWars.AIWars() self.vic = Victory.Victory() #self.pla = Plague.Plague() self.com = Communications.Communications() self.dc = DynamicCivs.DynamicCivs() self.corp = Companies.Companies() self.rfccwaiw = RFCCWAIWars.RFCCWAIWars()