From fe88e065abe87b1da48bb705163b595423083f42 Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Fri, 26 Jan 2024 21:23:56 +0100 Subject: [PATCH] minor turtle improvements --- src/kernel/turtle/Turtle.hx | 2 +- src/kernel/turtle/Types.hx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kernel/turtle/Turtle.hx b/src/kernel/turtle/Turtle.hx index 3a97a9c..31ca387 100644 --- a/src/kernel/turtle/Turtle.hx +++ b/src/kernel/turtle/Turtle.hx @@ -257,7 +257,7 @@ class Turtle { }); } - public static function getItemDetail(?detailed:Bool = false, ?slot:TurtleSlot):Option { + public static function getItemDetail(slot:TurtleSlot, ?detailed:Bool = false):Option { var r = cc.Turtle.getItemDetail(slot + 1); // FIXME: can take detailed as flag. Has to be fixed upstream if (r == null) { diff --git a/src/kernel/turtle/Types.hx b/src/kernel/turtle/Types.hx index 928eaea..6029b2d 100644 --- a/src/kernel/turtle/Types.hx +++ b/src/kernel/turtle/Types.hx @@ -23,4 +23,7 @@ typedef ItemInspect = { public var count:Int; } +/** + The slot nummber for turtle inventory. 0 based. +**/ typedef TurtleSlot = Int;