add parameter to getDescription

This commit is contained in:
chrys 2016-09-17 02:14:11 +02:00
parent 482394c92a
commit 9744e428cb
12 changed files with 23 additions and 13 deletions

View File

@ -7,8 +7,9 @@ class command():
return environment
def shutdown(self, environment):
return environment
def getDescription(self):
def getDescription(self, environment):
return ''
def run(self, environment):
# TTY Change
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:

View File

@ -7,8 +7,9 @@ class command():
return environment
def shutdown(self, environment):
return environment
def getDescription(self):
def getDescription(self, environment):
return ''
def run(self, environment):
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
return environment

View File

@ -7,7 +7,7 @@ class command():
return environment
def shutdown(self, environment):
return environment
def getDescription(self):
def getDescription(self, environment):
return ''
def run(self, environment):

View File

@ -8,8 +8,9 @@ class command():
return environment
def shutdown(self, environment):
return environment
def getDescription(self):
def getDescription(self, environment):
return ''
def run(self, environment):
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'wordEcho'):
return environment

View File

@ -15,8 +15,9 @@ class command():
return environment
def shutdown(self, environment):
return environment
def getDescription(self):
def getDescription(self, environment):
return 'No Description found'
def run(self, environment):
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck'):
return environment

View File

@ -7,10 +7,10 @@ class command():
return environment
def shutdown(self, environment):
return environment
def getDescription(self):
def getDescription(self, environment):
return ''
def run(self, environment):
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'charDeleteEcho'):
return environment

View File

@ -7,8 +7,9 @@ class command():
return environment
def shutdown(self, environment):
return environment
def getDescription(self):
def getDescription(self, environment):
return ''
def run(self, environment):
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'):
return environment

View File

@ -8,8 +8,9 @@ class command():
return environment
def shutdown(self, environment):
return environment
def getDescription(self):
def getDescription(self, environment):
return ''
def run(self, environment):
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'promote', 'enabled'):
return environment

View File

@ -7,8 +7,9 @@ class command():
return environment
def shutdown(self, environment):
return environment
def getDescription(self):
def getDescription(self, environment):
return ''
def run(self, environment):
if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']:
return environment

View File

@ -7,8 +7,9 @@ class command():
return environment
def shutdown(self, environment):
return environment
def getDescription(self):
def getDescription(self, environment):
return ''
def run(self, environment):
if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']:
return environment

View File

@ -7,8 +7,9 @@ class command():
return environment
def shutdown(self, environment):
return environment
def getDescription(self):
def getDescription(self, environment):
return ''
def run(self, environment):
if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']:
return environment

View File

@ -54,7 +54,8 @@ class commandManager():
if self.commandExists(environment, command, section):
try:
if environment['generalInformation']['tutorialMode']:
environment['commands'][section][command].getDescription(environment)
description = environment['commands'][section][command].getDescription(environment)
environment['runtime']['outputManager'].presentText(environment, description, interrupt=True)
else:
environment['commands'][section][command].run(environment)
except Exception as e: