Update commander.py and mission.py

This commit is contained in:
Richard Bronkhorst 2023-06-20 23:12:57 +02:00
parent b202b80541
commit 42e370fde5
2 changed files with 8 additions and 2 deletions

View File

@ -99,6 +99,10 @@ class Commander(CommandLine):
self.set_mission(arg)
self.print_mission()
def mreset(self):
if not self.has_ship(): return
self.ship.mission_state = {}
def do_mset(self, nm, val):
if not self.has_ship(): return
self.centcom.set_mission_param(self.ship, nm, val)

View File

@ -189,7 +189,8 @@ class BaseMission(Mission):
else:
self.api.jump(self.ship, hop)
self.next_step = self.ship.cooldown
if traject == []:
traject= None
self.sts('traject', traject)
return 'more'
@ -351,7 +352,7 @@ class HaulMission(BaseMission):
class TravelMission(BaseMission):
def start_state(self):
return 'travel'
return 'orbit'
@classmethod
def params(cls):
@ -361,6 +362,7 @@ class TravelMission(BaseMission):
def steps(self):
return {
'orbit': (self.step_orbit, 'travel'),
'travel': (self.step_travel_dest, {
'more': 'travel',
'done': 'done'