Request to be able to use the numpad if numlock is on and only process fenrir commands if numlock is off. This should work, let me know if anything breaks.
This commit is contained in:
@ -27,7 +27,7 @@ class commandManager():
|
||||
|
||||
# scripts for scriptKey
|
||||
self.env['runtime']['commandManager'].loadScriptCommands()
|
||||
|
||||
|
||||
def shutdown(self):
|
||||
for commandFolder in self.env['general']['commandFolderList']:
|
||||
self.env['runtime']['commandManager'].shutdownCommands(commandFolder)
|
||||
@ -99,7 +99,7 @@ class commandManager():
|
||||
self.env['runtime']['debug'].writeDebugOut("loadCommands: Loading command:" + command ,debug.debugLevel.ERROR)
|
||||
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||
continue
|
||||
|
||||
|
||||
def loadScriptCommands(self, section='commands', scriptPath=''):
|
||||
if scriptPath =='':
|
||||
scriptPath = self.env['runtime']['settingsManager'].getSetting('general', 'scriptPath')
|
||||
@ -165,7 +165,7 @@ class commandManager():
|
||||
if section not in self.env['commands']:
|
||||
self.env['runtime']['debug'].writeDebugOut("shutdownCommands: section not found:" + section, debug.debugLevel.WARNING)
|
||||
return
|
||||
|
||||
|
||||
for command in sorted(self.env['commands'][section]):
|
||||
try:
|
||||
self.env['commands'][section][command].shutdown()
|
||||
@ -228,7 +228,7 @@ class commandManager():
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut("Executing command:" + section + "." + command +' ' + str(e),debug.debugLevel.ERROR)
|
||||
|
||||
|
||||
|
||||
def runCommand(self, command, section = 'commands'):
|
||||
if self.commandExists(command, section):
|
||||
try:
|
||||
@ -237,7 +237,7 @@ class commandManager():
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut("runCommand command:" + section + "." + command +' ' + str(e),debug.debugLevel.ERROR)
|
||||
self.env['commandInfo']['lastCommandExecutionTime'] = time.time()
|
||||
|
||||
|
||||
def getCommandDescription(self, command, section = 'commands'):
|
||||
if self.commandExists(command, section):
|
||||
try:
|
||||
@ -245,7 +245,7 @@ class commandManager():
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('commandManager.getCommandDescription:' + str(e),debug.debugLevel.ERROR)
|
||||
self.env['commandInfo']['lastCommandExecutionTime'] = time.time()
|
||||
|
||||
|
||||
def commandExists(self, command, section = 'commands'):
|
||||
try:
|
||||
return( command in self.env['commands'][section])
|
||||
|
Reference in New Issue
Block a user