Dancing Hoskuld
Deity
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.
Where should I be looking?
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?