nation['cities'] to nation.cities
This commit is contained in:
1 parent
675873b3e2
commit
073dec2be0
1 file changed
+6
-7
+6
-7
@@ -1023,7 +1023,6 @@ class Banking(commands.Cog):
|
||||
treasure_text = ""
|
||||
footer = ""
|
||||
|
||||
city = city.to_dict()
|
||||
|
||||
if nation['iron_works'] == True:
|
||||
ste_mod = 1.36
|
||||
@@ -1073,7 +1072,7 @@ class Banking(commands.Cog):
|
||||
await message.edit(content="Something is wrong with the build you sent!")
|
||||
return
|
||||
land = 0
|
||||
for city in nation['cities']:
|
||||
for city in nation.cities:
|
||||
land += city['land']
|
||||
city = {}
|
||||
for key, value in build.items():
|
||||
@@ -1081,11 +1080,11 @@ class Banking(commands.Cog):
|
||||
city['infrastructure'] = city.pop('a_needed')
|
||||
city['land'] = round(land/nation['num_cities'])
|
||||
city['powered'] = True
|
||||
city['date'] = nation['cities'][math.ceil(nation['num_cities']/2)]['date']
|
||||
nation['cities'] = [city]
|
||||
city['date'] = nation.cities[math.ceil(nation['num_cities']/2)]['date']
|
||||
nation.cities = [city]
|
||||
#print(city)
|
||||
|
||||
for city in nation['cities']:
|
||||
for city in nation.cities:
|
||||
total_infra += city['infrastructure']
|
||||
base_pop = city['infrastructure'] * 100
|
||||
pollution = 0
|
||||
@@ -1297,10 +1296,10 @@ class Banking(commands.Cog):
|
||||
starve_net_text = f" (${round(money_income * policy_bonus * new_player_bonus * 0.67 + color_bonus - power_upkeep - rss_upkeep - military_upkeep * mil_cost - civil_upkeep + coal * prices['coal'] + oil * prices['oil'] + uranium * prices['uranium'] + lead * prices['lead'] + iron * prices['iron'] + bauxite * prices['bauxite'] + gasoline * prices['gasoline'] + munitions * prices['munitions'] + steel * prices['steel'] + aluminum * prices['aluminum'] + food * prices['food']):,}*)"
|
||||
footer = "* The income if the nation is suffering from a starvation penalty"
|
||||
|
||||
max_infra = sorted(nation['cities'], key=lambda k: k['infrastructure'], reverse=True)[0]['infrastructure']
|
||||
max_infra = sorted(nation.cities, key=lambda k: k['infrastructure'], reverse=True)[0]['infrastructure']
|
||||
|
||||
if single_city:
|
||||
rev_obj = nation['cities'][0]
|
||||
rev_obj = nation.cities[0]
|
||||
else:
|
||||
rev_obj = {}
|
||||
rev_obj['monetary_net_num'] = round(money_income * policy_bonus * new_player_bonus * nation_treasure_bonus + color_bonus - power_upkeep - rss_upkeep - military_upkeep * mil_cost - civil_upkeep + coal * prices['coal'] + oil * prices['oil'] + uranium * prices['uranium'] + lead * prices['lead'] + iron * prices['iron'] + bauxite * prices['bauxite'] + gasoline * prices['gasoline'] + munitions * prices['munitions'] + steel * prices['steel'] + aluminum * prices['aluminum'] + food * prices['food'])
|
||||
|
||||
Reference in new issue
Block a user