Ekmek
on steam: ekmek_e
I like johnny smith's url=http://forums.civfanatics.com/showpost.php?p=6400456&postcount=15]New scrolling corporation screen[/url]
But I feel the firaxis corporation screen could use some more info. So I need help to:
1) Add the total gold value that the HQ generates. CvMainInterface.py has this code, but where do I put in the corporation screen python?
2) the other thing I want t add is a line that tells how many cities in the world have that corporation. So it'll be a loop of all player cities. So how do I do that?
thx.
But I feel the firaxis corporation screen could use some more info. So I need help to:
1) Add the total gold value that the HQ generates. CvMainInterface.py has this code, but where do I put in the corporation screen python?
Code:
for i in range(gc.getNumCorporationInfos()):
xCoord = xResolution - 242 + (i * 34)
yCoord = 66
bEnable = True
if (pHeadSelectedCity.isHasCorporation(i)):
if (pHeadSelectedCity.isHeadquartersByType(i)):
szTempBuffer = u"%c" %(gc.getCorporationInfo(i).getHeadquarterChar())
szName = "CorporationHeadquarterDDS" + str(i)
screen.show( szName )
else:
szTempBuffer = u"%c" %(gc.getCorporationInfo(i).getChar())
szBuffer = szBuffer + szTempBuffer
for j in range(YieldTypes.NUM_YIELD_TYPES):
iYield = pHeadSelectedCity.getCorporationYieldByCorporation(j, i)
if (iYield != 0):
if ( iYield > 0 ):
szTempBuffer = u",%s%d%c" %("+", iYield, gc.getYieldInfo(j).getChar() )
szBuffer = szBuffer + szTempBuffer
else:
szTempBuffer = u",%s%d%c" %( "", iYield, gc.getYieldInfo(j).getChar() )
szBuffer = szBuffer + szTempBuffer
for j in range(CommerceTypes.NUM_COMMERCE_TYPES):
iCommerce = pHeadSelectedCity.getCorporationCommerceByCorporation(j, i)
if (iCommerce != 0):
if ( iCommerce > 0 ):
szTempBuffer = u",%s%d%c" %("+", iCommerce, gc.getCommerceInfo(j).getChar() )
szBuffer = szBuffer + szTempBuffer
else:
szTempBuffer = u",%s%d%c" %( "", iCommerce, gc.getCommerceInfo(j).getChar() )
szBuffer = szBuffer + szTempBuffer
szBuffer += " "
szButton = gc.getCorporationInfo(i).getButton()
else:
2) the other thing I want t add is a line that tells how many cities in the world have that corporation. So it'll be a loop of all player cities. So how do I do that?
thx.