minor turtle improvements

This commit is contained in:
Niklas Kapelle 2024-01-26 21:23:56 +01:00
parent e2916a213a
commit fe88e065ab
Signed by: niklas
GPG Key ID: 4EB651B36D841D16
2 changed files with 4 additions and 1 deletions

View File

@ -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) {

View File

@ -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;