diff --git a/nullptr/mission.py b/nullptr/mission.py index c4cab2e..a38e497 100644 --- a/nullptr/mission.py +++ b/nullptr/mission.py @@ -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}')