minor turtle improvements
This commit is contained in:
parent
e2916a213a
commit
fe88e065ab
@ -257,7 +257,7 @@ class Turtle {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getItemDetail(?detailed:Bool = false, ?slot:TurtleSlot):Option<ItemInspect> {
|
public static function getItemDetail(slot:TurtleSlot, ?detailed:Bool = false):Option<ItemInspect> {
|
||||||
var r = cc.Turtle.getItemDetail(slot + 1); // FIXME: can take detailed as flag. Has to be fixed upstream
|
var r = cc.Turtle.getItemDetail(slot + 1); // FIXME: can take detailed as flag. Has to be fixed upstream
|
||||||
|
|
||||||
if (r == null) {
|
if (r == null) {
|
||||||
|
@ -23,4 +23,7 @@ typedef ItemInspect = {
|
|||||||
public var count:Int;
|
public var count:Int;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
The slot nummber for turtle inventory. 0 based.
|
||||||
|
**/
|
||||||
typedef TurtleSlot = Int;
|
typedef TurtleSlot = Int;
|
||||||
|
Loading…
Reference in New Issue
Block a user