Update commander.py and mission.py
This commit is contained in:
parent
b202b80541
commit
42e370fde5
@ -99,6 +99,10 @@ class Commander(CommandLine):
|
|||||||
self.set_mission(arg)
|
self.set_mission(arg)
|
||||||
self.print_mission()
|
self.print_mission()
|
||||||
|
|
||||||
|
def mreset(self):
|
||||||
|
if not self.has_ship(): return
|
||||||
|
self.ship.mission_state = {}
|
||||||
|
|
||||||
def do_mset(self, nm, val):
|
def do_mset(self, nm, val):
|
||||||
if not self.has_ship(): return
|
if not self.has_ship(): return
|
||||||
self.centcom.set_mission_param(self.ship, nm, val)
|
self.centcom.set_mission_param(self.ship, nm, val)
|
||||||
|
@ -189,7 +189,8 @@ class BaseMission(Mission):
|
|||||||
else:
|
else:
|
||||||
self.api.jump(self.ship, hop)
|
self.api.jump(self.ship, hop)
|
||||||
self.next_step = self.ship.cooldown
|
self.next_step = self.ship.cooldown
|
||||||
|
if traject == []:
|
||||||
|
traject= None
|
||||||
self.sts('traject', traject)
|
self.sts('traject', traject)
|
||||||
return 'more'
|
return 'more'
|
||||||
|
|
||||||
@ -351,7 +352,7 @@ class HaulMission(BaseMission):
|
|||||||
|
|
||||||
class TravelMission(BaseMission):
|
class TravelMission(BaseMission):
|
||||||
def start_state(self):
|
def start_state(self):
|
||||||
return 'travel'
|
return 'orbit'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def params(cls):
|
def params(cls):
|
||||||
@ -361,6 +362,7 @@ class TravelMission(BaseMission):
|
|||||||
|
|
||||||
def steps(self):
|
def steps(self):
|
||||||
return {
|
return {
|
||||||
|
'orbit': (self.step_orbit, 'travel'),
|
||||||
'travel': (self.step_travel_dest, {
|
'travel': (self.step_travel_dest, {
|
||||||
'more': 'travel',
|
'more': 'travel',
|
||||||
'done': 'done'
|
'done': 'done'
|
||||||
|
Loading…
Reference in New Issue
Block a user