Require a market to use buying and selling
This commit is contained in:
@@ -49,7 +49,6 @@ class World():
|
||||
# results. Similarly, adding builders in the middle of building something
|
||||
# is not supported
|
||||
|
||||
# TODO require market to use market buy/sell
|
||||
# TODO allow automation:
|
||||
# reseeding of farms
|
||||
# possibly other things
|
||||
@@ -73,6 +72,9 @@ class World():
|
||||
|
||||
|
||||
def _use_market(self, resource, amount, buy=True):
|
||||
if Buildings.MARKET not in self.buildings:
|
||||
raise MissingDependencyException
|
||||
|
||||
if amount % self.costs.market_transaction_amount != 0:
|
||||
raise InvalidMarketAmountException
|
||||
|
||||
|
||||
Reference in New Issue
Block a user