From 9369c6982f65673892419a43a4e963cec2dc80b2 Mon Sep 17 00:00:00 2001 From: Richard Bronkhorst Date: Sun, 18 Jun 2023 20:02:33 +0200 Subject: [PATCH] Update central_command.py and mission.py --- nullptr/central_command.py | 3 +++ nullptr/mission.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nullptr/central_command.py b/nullptr/central_command.py index bddbba7..013906c 100644 --- a/nullptr/central_command.py +++ b/nullptr/central_command.py @@ -82,6 +82,9 @@ class CentralCommand: self.stop_mission(s) elif s not in self.missions: self.start_mission(s) + if s in self.missions: + m = self.missions[s] + m.next_step = max(s.cooldown, s.arrival) def start_mission(self, s): mtype = s.mission diff --git a/nullptr/mission.py b/nullptr/mission.py index 23b3f32..b4ff69a 100644 --- a/nullptr/mission.py +++ b/nullptr/mission.py @@ -188,7 +188,7 @@ class MiningMission(Mission): def step_sell(self, except_resource=True): target = self.st('resource') - market = self.api.market(self.ship.location) + market = self.store.get('Marketplace', self.ship.location()) sellables = market.sellable_items(self.ship.cargo.keys()) if target in sellables and except_resource: sellables.remove(target)