24 lines
558 B
Python
24 lines
558 B
Python
from nullptr.missions.base import BaseMission, MissionParam
|
|
from nullptr.models.waypoint import Waypoint
|
|
|
|
class SurveyMission(BaseMission):
|
|
def start_state(self):
|
|
return 'travel-to'
|
|
|
|
@classmethod
|
|
def params(cls):
|
|
return {
|
|
'site': MissionParam(Waypoint, True),
|
|
}
|
|
|
|
def steps(self):
|
|
return {
|
|
**self.travel_steps('to', 'site', 'survey'),
|
|
'survey': (self.step_survey, 'survey')
|
|
}
|
|
|
|
def step_survey(self):
|
|
result = self.api.survey(self.ship)
|
|
#pprint(result, 2)
|
|
self.next_step = self.ship.cooldown
|