diff --git a/src/kernel/turtle/Turtle.hx b/src/kernel/turtle/Turtle.hx index ae8d34a..340fbe0 100644 --- a/src/kernel/turtle/Turtle.hx +++ b/src/kernel/turtle/Turtle.hx @@ -6,11 +6,11 @@ using tink.CoreApi; class Turtle { public static var instance:Turtle; - public static var MAX_SLOTS(default, null):Int = 15; + public static final MAX_SLOTS:Int = 16; @:allow(kernel.Init) private function new() { - if (!Turtle.isTurtle()){ + if (!Turtle.isTurtle()) { Log.warn("Tried to initialize Turtle, but it is not available."); } } @@ -200,7 +200,8 @@ class Turtle { return cc.Turtle.compareTo(otherSlot + 1); } - public function transferToSlot(to:TurtleSlot, ?count:Int):Outcome { + public function transfer(from:TurtleSlot, to:TurtleSlot, ?count:Int):Outcome { + this.selectSlot(from); var r = cc.Turtle.transferTo(to + 1, count); return r ? Outcome.Success(null) : Outcome.Failure(null); }