*****first part*****
("GOLD", 38, "int", None, CyCity.getCommerceRate, CommerceTypes.COMMERCE_GOLD, None, None, "self.goldIcon"),
[COLOR="Red"]("GOLD_DIFF", 30, "int", None, None, 0, self.calculateGoldDiff, CommerceTypes.COMMERCE_GOLD, "u\"%c\" % CyGame().getSymbolID(FontSymbols.BAD_GOLD_CHAR)"),[/COLOR]
("GRANK_BASE_COMMERCE", 38, "int", None, None, 0, self.findGlobalBaseYieldRateRank, YieldTypes.YIELD_COMMERCE, "self.commerceIcon + u\"#\""),
*****second part*****
self.PROBLEM_VALUES_DICT = {
"GARRISON" : 0,
"HAPPY" : -1,
"HEALTH" : -1,
"GROWTH" : -1,
"FOOD" : -1,
[COLOR="red"] "GOLD_DIFF" : -1,[/COLOR]
}
*****third part*****
def calculateMaintenance (self, city, szKey, arg):
return unicode(city.getMaintenance())
[COLOR="red"]def calculateGoldDiff (self, city, szKey, arg):
gd = city.getCommerceRate(arg) - city.getMaintenance()
return gd[/COLOR]
def calculateTrade (self, city, szKey, arg):
nTotalTradeProfit = 0