0ptr/nullptr/missions/idle.py

27 lines
495 B
Python
Raw Normal View History

2024-01-04 20:34:31 +00:00
from nullptr.missions.base import BaseMission, MissionParam
import time
class IdleMission(BaseMission):
def start_state(self):
return 'start'
def step_wait(self):
self.next_step = int(time.time()) + self.st('seconds')
def step_idle(self):
pass
@classmethod
def params(cls):
return {
'seconds': MissionParam(int, True)
}
def steps(self):
return {
'start': (self.step_wait, 'wait'),
'wait': (self.step_idle, 'done')
}