g_gpBarList = (
"UNIT_GREAT_SPY",
"UNIT_ENGINEER",
"UNIT_MERCHANT",
"UNIT_SCIENTIST",
"UNIT_ARTIST",
"UNIT_PROPHET",
# MOD: specify the unit type (XML key) for each new great person (1)
"UNIT_DOCTOR",
"UNIT_STATESMAN",
"UNIT_GREAT_CITIZEN",
"UNIT_LAWYER",
"UNIT_GREAT_PUA",
"UNIT_GREAT_DOCTOR",
)
# Named constants for each great person and total number of GP types
# These must be in the exact same order as the list above
NUM_GP = len(g_gpBarList)
(
GP_SPY,
GP_ENGINEER,
GP_MERCHANT,
GP_SCIENTIST,
GP_ARTIST,
GP_PROPHET,
# MOD: define a constant for each new great person in same order as above (2)
GP_DOCTOR,
GP_STATESMAN,
GP_GREAT_CITIZEN,
GP_LAWYER,
GP_GREAT_PUA,
GP_GREAT_DOCTOR,
) = range(NUM_GP)
# Maps GP type to unit ID and color to show in GP Bar
g_gpUnitTypes = None
g_gpColors = None
g_unitIcons = None
# Information
def init():
global g_gpUnitTypes
g_gpUnitTypes = [None] * NUM_GP
for i, s in enumerate(g_gpBarList):
g_gpUnitTypes[i] = gc.getInfoTypeForString(s)
global g_gpColors
g_gpColors = [None] * NUM_GP
g_gpColors[GP_SPY] = gc.getInfoTypeForString("COLOR_WHITE")
g_gpColors[GP_ENGINEER] = gc.getYieldInfo(YieldTypes.YIELD_PRODUCTION).getColorType()
g_gpColors[GP_MERCHANT] = gc.getInfoTypeForString("COLOR_YELLOW")
g_gpColors[GP_SCIENTIST] = gc.getInfoTypeForString("COLOR_RESEARCH_STORED")
g_gpColors[GP_ARTIST] = gc.getInfoTypeForString("COLOR_CULTURE_STORED")
g_gpColors[GP_PROPHET] = gc.getInfoTypeForString("COLOR_BLUE")
# MOD: specify color for each new great person (3)
g_gpColors[GP_DOCTOR] = gc.getInfoTypeForString("COLOR_WHITE")
g_gpColors[GP_STATESMAN] = gc.getInfoTypeForString("COLOR_GREEN")
g_gpColors[GP_GREAT_CITIZEN] = gc.getInfoTypeForString("COLOR_BLUE")
g_gpColors[GP_LAWYER] = gc.getInfoTypeForString("COLOR_CYAN")
g_gpColors[GP_GREAT_PUA] = gc.getInfoTypeForString("COLOR_RED")
g_gpColors[GP_GREAT_DOCTOR] = gc.getInfoTypeForString("COLOR_WHITE")
global g_unitIcons
g_unitIcons = {}
g_unitIcons[g_gpUnitTypes[GP_SPY]] = u"%c" %(gc.getCommerceInfo(CommerceTypes.COMMERCE_ESPIONAGE).getChar())
g_unitIcons[g_gpUnitTypes[GP_ENGINEER]] = u"%c" %(gc.getYieldInfo(YieldTypes.YIELD_PRODUCTION).getChar())
g_unitIcons[g_gpUnitTypes[GP_MERCHANT]] = u"%c" %(gc.getCommerceInfo(CommerceTypes.COMMERCE_GOLD).getChar())
g_unitIcons[g_gpUnitTypes[GP_SCIENTIST]] = u"%c" %(gc.getCommerceInfo(CommerceTypes.COMMERCE_RESEARCH).getChar())
g_unitIcons[g_gpUnitTypes[GP_ARTIST]] = u"%c" %(gc.getCommerceInfo(CommerceTypes.COMMERCE_CULTURE).getChar())
g_unitIcons[g_gpUnitTypes[GP_PROPHET]] = u"%c" % CyGame().getSymbolID(FontSymbols.RELIGION_CHAR)
# MOD: specify icon (font glyph) for each new great person (4)
g_unitIcons[g_gpUnitTypes[GP_DOCTOR]] = u"%c" % CyGame().getSymbolID(FontSymbols.HEALTHY_CHAR)
g_unitIcons[g_gpUnitTypes[GP_STATESMAN]] = u"%c" %(gc.getCommerceInfo(CommerceTypes.COMMERCE_ESPIONAGE).getChar())
g_unitIcons[g_gpUnitTypes[GP_GREAT_CITIZEN]] = u"%c" %(gc.getCommerceInfo(CommerceTypes.COMMERCE_ESPIONAGE).getChar())
g_unitIcons[g_gpUnitTypes[GP_LAWYER]] = u"%c" %(gc.getCommerceInfo(CommerceTypes.COMMERCE_ESPIONAGE).getChar())
g_unitIcons[g_gpUnitTypes[GP_GREAT_PUA]] = u"%c" %(gc.getCommerceInfo(CommerceTypes.COMMERCE_GOLD).getChar())
g_unitIcons[g_gpUnitTypes[GP_GREAT_DOCTOR]] = u"%c" % CyGame().getSymbolID(FontSymbols.HEALTHY_CHAR)