diff --git a/scripts/modules/module.js b/scripts/modules/module.js
index 5a14099..f185d69 100644
--- a/scripts/modules/module.js
+++ b/scripts/modules/module.js
@@ -15,7 +15,7 @@ function Module(rune)
this.context = function()
{
- return this.select_layer().context();
+ return this._layer().context();
}
this.create_layer = function()
@@ -25,7 +25,7 @@ function Module(rune)
ronin.surface.add_layer(this.layer);
}
- this.select_layer = function()
+ this._layer = function()
{
if(!this.layer){ this.create_layer(); }
return this.layer;
diff --git a/scripts/modules/surface.js b/scripts/modules/surface.js
index 0a34435..6823a99 100644
--- a/scripts/modules/surface.js
+++ b/scripts/modules/surface.js
@@ -50,9 +50,9 @@ function Surface(rune)
{
var layer_name = params[0];
if(!ronin.surface.layers[layer_name]){
- this.add_layer(new Layer(name));
+ this.add_layer(new Layer(layer_name));
}
- this.select_layer(this.layers[name]);
+ this.select_layer(this.layers[layer_name]);
}
this.select_layer = function(layer)
diff --git a/scripts/modules/terminal.js b/scripts/modules/terminal.js
index a338f0a..5c901c4 100644
--- a/scripts/modules/terminal.js
+++ b/scripts/modules/terminal.js
@@ -76,6 +76,7 @@ function Terminal(rune)
{
if(!ronin.terminal.queue[0]){ console.log("Finished queue"); return; }
+ console.info(ronin.terminal.queue[0]);
active(ronin.terminal.queue[0].trim());
ronin.terminal.queue.shift();
@@ -100,25 +101,6 @@ function Terminal(rune)
}
}
- //
-
- this.logs = [];
-
- this.log = function(log)
- {
- this.logs.push(log);
- }
-
- this.update_log = function()
- {
- if(ronin.terminal.logs[0]){
- ronin.terminal.logs_element.appendChild(ronin.terminal.logs[0].element);
- ronin.terminal.logs.shift();
- }
-
- setTimeout(function(){ ronin.terminal.update_log(); }, 200);
- }
-
// Hint
this.update_hint = function(content = this.input_element.value)
@@ -178,13 +160,36 @@ function Terminal(rune)
}
return ""+s+"";
}
+
+ //
+
+ this.logs = [];
+
+ this.log = function(log)
+ {
+ this.logs.push(log);
+ }
+
+ this.update_log = function()
+ {
+ if(ronin.terminal.logs[0]){
+ ronin.terminal.logs_element.appendChild(ronin.terminal.logs[0].element);
+ ronin.terminal.logs.shift();
+ }
+
+ setTimeout(function(){ ronin.terminal.update_log(); }, 200);
+ }
}
// Log
function Log(host,message,type = "default")
{
+ this.host = host;
+ this.message = message;
+ this.type = type;
this.element = document.createElement("log");
this.element.setAttribute("class",type);
this.element.innerHTML = ""+host.rune+" "+message;
+ console.log(this.host.constructor.name,this.message)
}
\ No newline at end of file