Update mission.py
This commit is contained in:
parent
fbda97df61
commit
b023718450
@ -349,12 +349,30 @@ class HaulMission(BaseMission):
|
||||
'orbit2': (self.step_orbit, 'travel')
|
||||
}
|
||||
|
||||
class TravelMission(BaseMission):
|
||||
def start_state(self):
|
||||
return 'travel'
|
||||
|
||||
@classmethod
|
||||
def params(cls):
|
||||
return {
|
||||
'destination': MissionParam(Waypoint, True)
|
||||
}
|
||||
|
||||
def steps(self):
|
||||
return {
|
||||
'travel': (self.step_travel_site, {
|
||||
'more': 'travel',
|
||||
'done': 'done'
|
||||
})
|
||||
}
|
||||
|
||||
def create_mission(mtype, ship, store, api):
|
||||
types = {
|
||||
'survey': SurveyMission,
|
||||
'mine': MiningMission,
|
||||
'haul': HaulMission
|
||||
'haul': HaulMission,
|
||||
'travel': TravelMission
|
||||
}
|
||||
if mtype not in types:
|
||||
logging.warning(f'invalid mission type {mtype}')
|
||||
|
Loading…
Reference in New Issue
Block a user