I have been toying around a bit with the groovy console in an attempt to make it a bit more user friendly. However, I ran into a couple issues that require some consideration :
1 : typo's in commands can easily be caught, no prob there
2: however, typing a command line "teleport" without params actually suggests methods like Sleep(long) for example
3: typing a wrong parameter produces a pretty generic nullpointer exception, hard to do something decent with that
4 : as the console closes after a succesfull command, it becomes pretty unintuitive to display messages as you have to reopen the console to actually see them. the method runGroovyShell only returns a boolean, I'd suggest using an int type so we can actually differentiate at least 3 states :
0 : you did something wrong, the console stays open and gives feedback
1 : You requested info (succesfully), but the console has to remain open to type the next command
2 : command was succesfull and console was closed, feedback messages
and probably a 3: only the feedback message was updated / reset, and you now need to enter a command...
I also think it would be usefull to actually include a command which enables / disables the feedback messages, also thinking of the future and annoyances due to the fact that you can't scroll atm... I'm pretty sure scrolling will have to be considered to keep things clean... the text also hides behind other gui elements so you have to consider screen size etc...
basically, it would require quite some changes, I comitted what I did so far, dirty solution and everything, at https://github.com/overdhose/Terasology so you can review it if you like and make suggestions if you like...
1 : typo's in commands can easily be caught, no prob there
2: however, typing a command line "teleport" without params actually suggests methods like Sleep(long) for example
3: typing a wrong parameter produces a pretty generic nullpointer exception, hard to do something decent with that
4 : as the console closes after a succesfull command, it becomes pretty unintuitive to display messages as you have to reopen the console to actually see them. the method runGroovyShell only returns a boolean, I'd suggest using an int type so we can actually differentiate at least 3 states :
0 : you did something wrong, the console stays open and gives feedback
1 : You requested info (succesfully), but the console has to remain open to type the next command
2 : command was succesfull and console was closed, feedback messages
and probably a 3: only the feedback message was updated / reset, and you now need to enter a command...
I also think it would be usefull to actually include a command which enables / disables the feedback messages, also thinking of the future and annoyances due to the fact that you can't scroll atm... I'm pretty sure scrolling will have to be considered to keep things clean... the text also hides behind other gui elements so you have to consider screen size etc...
basically, it would require quite some changes, I comitted what I did so far, dirty solution and everything, at https://github.com/overdhose/Terasology so you can review it if you like and make suggestions if you like...