Add trade
This commit is contained in:
19
aoe/world.py
19
aoe/world.py
@@ -43,16 +43,11 @@ class World():
|
||||
# to farms with the highest capacity.
|
||||
# We keep track of only the closest upcoming farm deletion.
|
||||
|
||||
# TODO fishing ships
|
||||
# TODO relics
|
||||
# TODO trade carts
|
||||
# TODO fishtraps
|
||||
# TODO allow automation:
|
||||
# reseeding of farms
|
||||
# queuing of villagers
|
||||
# possibly other things
|
||||
# TODO gathering boars and hunting
|
||||
# spend villager time in exchange for adding gatherable resource
|
||||
# TODO food spoilage
|
||||
# TODO use market for buy/sell
|
||||
|
||||
|
||||
@@ -419,6 +414,10 @@ class World():
|
||||
if not initial_task:
|
||||
initial_task = Tasks.FISH_SHIP_IDLE
|
||||
self.villager_tasks[initial_task] += 1
|
||||
elif thing == Units.TRADECOG:
|
||||
self.villager_tasks[Tasks.TRADECOG] += 1
|
||||
elif thing == Units.TRADECART:
|
||||
self.villager_tasks[Tasks.TRADECART] += 1
|
||||
|
||||
|
||||
def _start_producing(self, thing, initial_task):
|
||||
@@ -455,6 +454,14 @@ class World():
|
||||
self._queue_thing(Units.FISHINGSHIP, initial_task)
|
||||
|
||||
|
||||
def queue_trade_cog(self):
|
||||
self._queue_thing(Units.TRADECOG)
|
||||
|
||||
|
||||
def queue_trade_cart(self):
|
||||
self._queue_thing(Units.TRADECART)
|
||||
|
||||
|
||||
def _handle_events(self):
|
||||
for func, args in self.events[self.current_time]:
|
||||
func(*args)
|
||||
|
||||
Reference in New Issue
Block a user