g_gpBarList = (
"UNIT_GREAT_SPY",
"UNIT_ENGINEER",
"UNIT_MERCHANT",
"UNIT_SCIENTIST",
"UNIT_ARTIST",
"UNIT_PROPHET",
[COLOR="Red"]"UNIT_GREAT_GENERAL",[/COLOR]
)
NUM_GP = len(g_gpBarList)
(
GP_SPY,
GP_ENGINEER,
GP_MERCHANT,
GP_SCIENTIST,
GP_ARTIST,
GP_PROPHET,
[COLOR="red"]GP_GENERAL[/COLOR]
) = range(NUM_GP)
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")
[COLOR="Red"]g_gpColors[GP_GENERAL] = gc.getInfoTypeForString("COLOR_RED")[/COLOR]
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)
[COLOR="Red"]g_unitIcons[g_gpUnitTypes[GP_GENERAL]] = u"%c" % CyGame().getSymbolID(FontSymbols.HEALTHY_CHAR)[/COLOR]