tuple indices must be integers or slices, not str
This commit is contained in:
parent
a208c8bcf0
commit
ab3ce2b8c3
@ -5,7 +5,7 @@
|
||||
__author__ = """Eriks Karls"""
|
||||
__email__ = 'eriks@72.lv'
|
||||
__version__ = '0.20.0'
|
||||
__commit_id__ = "09c6255"
|
||||
__commit_id__ = "a208c8b"
|
||||
|
||||
from erepublik import classes, utils
|
||||
from erepublik.citizen import Citizen
|
||||
|
@ -1083,7 +1083,7 @@ class CitizenEconomy(CitizenTravel):
|
||||
|
||||
cheapest_q, cheapest = sorted(local_offers.items(), key=lambda v: v[1].price / utils.FOOD_ENERGY[v[0]])[0]
|
||||
|
||||
if cheapest["amount"] * utils.FOOD_ENERGY[cheapest_q] < hp_needed:
|
||||
if cheapest.amount * utils.FOOD_ENERGY[cheapest_q] < hp_needed:
|
||||
amount = cheapest.amount
|
||||
else:
|
||||
amount = hp_needed // utils.FOOD_ENERGY[cheapest_q]
|
||||
|
Loading…
x
Reference in New Issue
Block a user