27 lines
658 B
Python
27 lines
658 B
Python
|
|
class Action():
|
|
def __init__(self, action_id, action):
|
|
self._id: str = action_id
|
|
self._type: str = action['type']
|
|
self._target: str = action['target']
|
|
self._condition : list[str] = action['condition']
|
|
# self._duration = action.get('duration', None)
|
|
# self._goto = action.get('goto', None)
|
|
# self._cycle = action.get('cycle', None)
|
|
|
|
@property
|
|
def id(self):
|
|
return self._id
|
|
|
|
@property
|
|
def type(self):
|
|
return self._type
|
|
|
|
@property
|
|
def target(self):
|
|
return self._target
|
|
|
|
@property
|
|
def condition(self):
|
|
return self._condition
|