turtle init stuff
This commit is contained in:
parent
943391dddc
commit
8339c69ecc
@ -1,5 +1,6 @@
|
|||||||
package kernel;
|
package kernel;
|
||||||
|
|
||||||
|
import kernel.turtle.Turtle;
|
||||||
import haxe.MainLoop;
|
import haxe.MainLoop;
|
||||||
import kernel.net.Routing;
|
import kernel.net.Routing;
|
||||||
import cc.OS;
|
import cc.OS;
|
||||||
@ -18,6 +19,10 @@ class Init {
|
|||||||
MainTerm.instance = new MainTerm();
|
MainTerm.instance = new MainTerm();
|
||||||
Log.init();
|
Log.init();
|
||||||
|
|
||||||
|
if (Turtle.isTurtle()){
|
||||||
|
Turtle.instance = new Turtle();
|
||||||
|
}
|
||||||
|
|
||||||
Routing.instance = new Routing();
|
Routing.instance = new Routing();
|
||||||
Net.instance = new Net();
|
Net.instance = new Net();
|
||||||
|
|
||||||
|
@ -4,9 +4,16 @@ import kernel.turtle.Types;
|
|||||||
|
|
||||||
using tink.CoreApi;
|
using tink.CoreApi;
|
||||||
|
|
||||||
typedef TurtleSlot = Int;
|
|
||||||
|
|
||||||
class Turtle {
|
class Turtle {
|
||||||
|
public static var instance:Turtle;
|
||||||
|
|
||||||
|
@:allow(kernel.Init)
|
||||||
|
private function new() {
|
||||||
|
if (!Turtle.isTurtle()){
|
||||||
|
Log.warn("Tried to initialize Turtle, but it is not available.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function isTurtle():Bool {
|
public static function isTurtle():Bool {
|
||||||
return true; // TODO: Implement
|
return true; // TODO: Implement
|
||||||
}
|
}
|
||||||
|
@ -22,3 +22,5 @@ typedef ItemInspect = {
|
|||||||
public var damage:Int;
|
public var damage:Int;
|
||||||
public var count:Int;
|
public var count:Int;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef TurtleSlot = Int;
|
||||||
|
Loading…
Reference in New Issue
Block a user