use BinStore in Terminal

This commit is contained in:
Djeeberjr 2023-05-23 14:36:51 +02:00
parent 94d02d60af
commit e73b4c4d14

View File

@ -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:
var bin = BinStore.instance.getBinByAlias(name);
if (bin == null) {
return null;
}
return Type.createInstance(bin.c,[]);
}
private function moveCursorToInput() {