### HR - Pyramids
if not pHeadSelectedCity.isDisorder():
iPlayer = pHeadSelectedCity.getOwner()
if gc.getPlayer(iPlayer).getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_PYRAMIDS")) == 1:
if pHeadSelectedCity.isFoodProduction():
iFoodDifference += pHeadSelectedCity.getYieldRate(0) - pHeadSelectedCity.foodConsumption(False, 0)
###
iProductionDiffNoFood = pHeadSelectedCity.getCurrentProductionDifference(True, True)
iProductionDiffJustFood = (pHeadSelectedCity.getCurrentProductionDifference(False, True) - iProductionDiffNoFood)
szBuffer = u"<font=4>"
if (pHeadSelectedCity.isCapital()):
szBuffer += u"%c" %(CyGame().getSymbolID(FontSymbols.STAR_CHAR))
elif (pHeadSelectedCity.isGovernmentCenter()):
szBuffer += u"%c" %(CyGame().getSymbolID(FontSymbols.SILVER_STAR_CHAR))
if (pHeadSelectedCity.isPower()):
szBuffer += u"%c" %(CyGame().getSymbolID(FontSymbols.POWER_CHAR))
szBuffer += u"%s: %d" %(pHeadSelectedCity.getName(), pHeadSelectedCity.getPopulation())
if (pHeadSelectedCity.isOccupation()):
szBuffer += u" (%c:%d)" %(CyGame().getSymbolID(FontSymbols.OCCUPATION_CHAR), pHeadSelectedCity.getOccupationTimer())
szBuffer += u"</font>"
screen.setText( "CityNameText", "Background", szBuffer, CvUtil.FONT_CENTER_JUSTIFY, screen.centerX(512), 32, -0.3, FontTypes.GAME_FONT, WidgetTypes.WIDGET_CITY_NAME, -1, -1 )
screen.setStyle( "CityNameText", "Button_Stone_Style" )
screen.show( "CityNameText" )
### BUG - Food Assist
if ( CityUtil.willGrowThisTurn(pHeadSelectedCity) or (iFoodDifference != 0) or not (pHeadSelectedCity.isFoodProduction() ) ):
if (CityUtil.willGrowThisTurn(pHeadSelectedCity)):
szBuffer = localText.getText("INTERFACE_CITY_GROWTH", ())
elif (iFoodDifference > 0):
### HR - Pyramids
iFoodTurnsLeft = (pHeadSelectedCity.growthThreshold() - pHeadSelectedCity.getFood()) / iFoodDifference
if (pHeadSelectedCity.growthThreshold() - pHeadSelectedCity.getFood()) % iFoodDifference > 0:
iFoodTurnsLeft += 1
###
szBuffer = localText.getText("INTERFACE_CITY_GROWING", (pHeadSelectedCity.getFoodTurnsLeft(), ))
elif (iFoodDifference < 0):
if (CityScreenOpt.isShowFoodAssist()):
iTurnsToStarve = pHeadSelectedCity.getFood() / -iFoodDifference + 1
if iTurnsToStarve > 1:
szBuffer = localText.getText("INTERFACE_CITY_SHRINKING", (iTurnsToStarve, ))
else:
szBuffer = localText.getText("INTERFACE_CITY_STARVING", ())
else:
szBuffer = localText.getText("INTERFACE_CITY_STARVING", ())
###
else:
szBuffer = localText.getText("INTERFACE_CITY_STAGNANT", ())
screen.setLabel( "PopulationText", "Background", szBuffer, CvUtil.FONT_CENTER_JUSTIFY, screen.centerX(512), iCityCenterRow1Y, -1.3, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
screen.setHitTest( "PopulationText", HitTestTypes.HITTEST_NOHIT )
screen.show( "PopulationText" )
### HR - Pyramids
if not pHeadSelectedCity.isDisorder():
if not pHeadSelectedCity.isFoodProduction() or gc.getPlayer(iPlayer).getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_PYRAMIDS")) == 1:
### BUG - Food Assist
if (CityScreenOpt.isShowFoodAssist()):
iFoodYield = pHeadSelectedCity.getYieldRate(YieldTypes.YIELD_FOOD)
iFoodEaten = pHeadSelectedCity.foodConsumption(False, 0)
if iFoodYield == iFoodEaten:
szBuffer = localText.getText("INTERFACE_CITY_FOOD_STAGNATE", (iFoodYield, iFoodEaten))
elif iFoodYield > iFoodEaten:
szBuffer = localText.getText("INTERFACE_CITY_FOOD_GROW", (iFoodYield, iFoodEaten, iFoodYield - iFoodEaten))
else:
szBuffer = localText.getText("INTERFACE_CITY_FOOD_SHRINK", (iFoodYield, iFoodEaten, iFoodYield - iFoodEaten))
else:
szBuffer = u"%d%c - %d%c" %(pHeadSelectedCity.getYieldRate(YieldTypes.YIELD_FOOD), gc.getYieldInfo(YieldTypes.YIELD_FOOD).getChar(), pHeadSelectedCity.foodConsumption(False, 0), CyGame().getSymbolID(FontSymbols.EATEN_FOOD_CHAR))
###
screen.setLabel( "PopulationInputText", "Background", szBuffer, CvUtil.FONT_RIGHT_JUSTIFY, iCityCenterRow1X - 6, iCityCenterRow1Y, -0.3, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
screen.show( "PopulationInputText" )
else:
if not pHeadSelectedCity.isFoodProduction():
szBuffer = u"%d%c" %(iFoodDifference, gc.getYieldInfo(YieldTypes.YIELD_FOOD).getChar())
screen.setLabel( "PopulationInputText", "Background", szBuffer, CvUtil.FONT_RIGHT_JUSTIFY, iCityCenterRow1X - 6, iCityCenterRow1Y, -0.3, FontTypes.GAME_FONT,
*BugDll.widget("WIDGET_FOOD_MOD_HELP", -1, -1) )
screen.show( "PopulationInputText" )
###