Great Prophet action buttons

Joined
Jul 5, 2004
Messages
23,562
Location
Canberra, Australia
Problem: In Rise of Mankind Holy Shrines are not wonders so whenever a Great Prophet is in a city all the holy shrine action buttons are showing except those that have been built in that city. With the extra religions this means two (extra) rows of action buttons.

Looking around How To Make Python Action Buttons tells me that the code should be in CvMainInterface.py. I can't find where in there the code is but I did find a BUG bit of code that should help solve my problem getPlayerHolyReligions(player) which returns a list of religion IDs for which <player> owns the holy city.

I think it should be somewhere in this bit of code but it isn't.
Spoiler :
Code:
		elif (not CyEngine().isGlobeviewUp() and pHeadSelectedUnit and CyInterface().getShowInterface() != InterfaceVisibility.INTERFACE_HIDE_ALL and CyInterface().getShowInterface() != InterfaceVisibility.INTERFACE_MINIMAP_ONLY):

			self.setMinimapButtonVisibility(True)

			if (CyInterface().getInterfaceMode() == InterfaceModeTypes.INTERFACEMODE_SELECTION):
			
				if ( pHeadSelectedUnit.getOwner() == gc.getGame().getActivePlayer() and g_pSelectedUnit != pHeadSelectedUnit ):
				
					g_pSelectedUnit = pHeadSelectedUnit
					
					iCount = 0

					actions = CyInterface().getActionsToShow()
					for i in actions:
						screen.appendMultiListButton( "BottomButtonContainer", gc.getActionInfo(i).getButton(), 0, WidgetTypes.WIDGET_ACTION, i, -1, False )
						screen.show( "BottomButtonContainer" )
				
						if ( not CyInterface().canHandleAction(i, False) ):
							screen.disableMultiListButton( "BottomButtonContainer", 0, iCount, gc.getActionInfo(i).getButton() )
							
						if ( pHeadSelectedUnit.isActionRecommended(i) ):#or gc.getActionInfo(i).getCommandType() == CommandTypes.COMMAND_PROMOTION ):
							screen.enableMultiListPulse( "BottomButtonContainer", True, 0, iCount )
						else:
							screen.enableMultiListPulse( "BottomButtonContainer", False, 0, iCount )

						iCount = iCount + 1

					if (CyInterface().canCreateGroup()):
						screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_CREATEGROUP").getPath(), 0, WidgetTypes.WIDGET_CREATE_GROUP, -1, -1, False )
						screen.show( "BottomButtonContainer" )
						
						iCount = iCount + 1

					if (CyInterface().canDeleteGroup()):
						screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_SPLITGROUP").getPath(), 0, WidgetTypes.WIDGET_DELETE_GROUP, -1, -1, False )
						screen.show( "BottomButtonContainer" )
						
						iCount = iCount + 1

Where should I be looking?
 
That's because it's an action button in the SDK. MISSION_CONSTRUCT, IIRC.
 
That's because it's an action button in the SDK. MISSION_CONSTRUCT, IIRC.

Sigh! Great, I even had a proper design of what I wanted to do before I saw that BUG util which did almost exactly was needed. Ie just show action buttons for religions which have been founded by the player and not yet built. Those that can be built in the current city are active those in another player's cities are inactive. Thus giving the player as much information as needed and no more.

Looks like I will just have to live with it.
 
Back
Top Bottom