use BinStore in Terminal
This commit is contained in:
parent
94d02d60af
commit
e73b4c4d14
@ -1,5 +1,6 @@
|
||||
package bin;
|
||||
|
||||
import kernel.binstore.BinStore;
|
||||
import kernel.ps.ProcessHandle;
|
||||
import kernel.ps.Process;
|
||||
import kernel.ps.ProcessManager;
|
||||
@ -146,22 +147,12 @@ class Terminal implements Process {
|
||||
}
|
||||
|
||||
private function getProgByName(name:String):Process {
|
||||
switch (name) {
|
||||
case "hello":
|
||||
return new HelloWorld();
|
||||
case "net":
|
||||
return new Net();
|
||||
case "rs":
|
||||
return new Redstone();
|
||||
case "disk":
|
||||
return new Disk();
|
||||
case "gps":
|
||||
return new GPS();
|
||||
case "turtle":
|
||||
return new Turtle();
|
||||
default:
|
||||
return null;
|
||||
var bin = BinStore.instance.getBinByAlias(name);
|
||||
if (bin == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Type.createInstance(bin.c,[]);
|
||||
}
|
||||
|
||||
private function moveCursorToInput() {
|
||||
|
Loading…
Reference in New Issue
Block a user