Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
29f9ce5ccc | |||
fa3881bf10 |
@ -4,7 +4,7 @@
|
||||
|
||||
__author__ = """Eriks Karls"""
|
||||
__email__ = 'eriks@72.lv'
|
||||
__version__ = '0.23.2.5'
|
||||
__version__ = '0.23.2.6'
|
||||
|
||||
from erepublik import classes, utils, constants
|
||||
from erepublik.citizen import Citizen
|
||||
|
@ -1026,7 +1026,6 @@ class CitizenEconomy(CitizenTravel):
|
||||
ret.update({house_quality: till})
|
||||
return ret
|
||||
|
||||
@utils.wait_for_lock
|
||||
def buy_and_activate_house(self, q: int) -> Optional[Dict[int, datetime]]:
|
||||
original_region = self.details.current_country, self.details.current_region
|
||||
ok_to_activate = False
|
||||
@ -1041,12 +1040,14 @@ class CitizenEconomy(CitizenTravel):
|
||||
global_cheapest = self.get_market_offers("House", q)[f"q{q}"]
|
||||
if global_cheapest.price + 200 < local_cheapest.price:
|
||||
if self.travel_to_country(global_cheapest.country):
|
||||
buy = self.buy_from_market(global_cheapest.offer_id, 1)
|
||||
buy = self.buy_market_offer(global_cheapest, 1)
|
||||
else:
|
||||
buy = {'error': True, 'message': 'Unable to travel!'}
|
||||
else:
|
||||
buy = self.buy_from_market(local_cheapest.offer_id, 1)
|
||||
if buy["error"]:
|
||||
buy = self.buy_market_offer(local_cheapest, 1)
|
||||
if buy is None:
|
||||
pass
|
||||
elif buy["error"]:
|
||||
msg = f"Unable to buy q{q} house! \n{buy['message']}"
|
||||
self.write_log(msg)
|
||||
else:
|
||||
|
@ -1016,7 +1016,7 @@ class TelegramBot:
|
||||
|
||||
|
||||
class OfferItem(NamedTuple):
|
||||
price: float = 99_999.
|
||||
price: float = 999_999_999.
|
||||
country: constants.Country = constants.Country(0, "", "", "")
|
||||
amount: int = 0
|
||||
offer_id: int = 0
|
||||
|
@ -1,5 +1,5 @@
|
||||
[bumpversion]
|
||||
current_version = 0.23.2.5
|
||||
current_version = 0.23.2.6
|
||||
commit = True
|
||||
tag = True
|
||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.?(?P<dev>\d+)?
|
||||
|
Reference in New Issue
Block a user