Improved Hint()
This commit is contained in:
@@ -4,11 +4,32 @@ function Default(rune)
|
||||
|
||||
this.hint = function()
|
||||
{
|
||||
var s = "";
|
||||
if(ronin.terminal.input_element.value == ""){
|
||||
var s = "";
|
||||
for(module in ronin.modules){
|
||||
s += ronin.modules[module].constructor.name+" ";
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
var candidates = [];
|
||||
|
||||
for(module in ronin.modules){
|
||||
s += ronin.modules[module].constructor.name+" ";
|
||||
for(method in ronin.modules[module].methods){
|
||||
candidates.push(module.toLowerCase()+"."+method);
|
||||
}
|
||||
}
|
||||
|
||||
var s = "";
|
||||
|
||||
for(candidate in candidates){
|
||||
if(candidates[candidate].indexOf(ronin.terminal.input_element.value) > -1){
|
||||
s += candidates[candidate]+" ";
|
||||
}
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ function Module(rune)
|
||||
|
||||
this.install = function()
|
||||
{
|
||||
console.log("Installing "+ronin.modules[this.rune].constructor.name);
|
||||
// console.log("Installing "+ronin.modules[this.rune].constructor.name);
|
||||
}
|
||||
|
||||
this.context = function()
|
||||
|
||||
Reference in New Issue
Block a user