mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-14 09:46:53 -04:00
Re-enabled inventory_controller.getInventorySize(sides.back)
for backwards compatibility. Will be removed in 1.5, use robot.inventorySize()
. Closes #860.
This commit is contained in:
parent
8da121964b
commit
a0f11d36b5
@ -76,6 +76,14 @@ object UpgradeInventoryController {
|
||||
else result(false)
|
||||
}
|
||||
|
||||
// TODO Remove in 1.5
|
||||
@Callback(doc = """function(side:number):number -- Get the number of slots in the inventory on the specified side of the robot.""")
|
||||
override def getInventorySize(context: Context, args: Arguments): Array[AnyRef] = {
|
||||
if (args.optInteger(0, -1) == ForgeDirection.NORTH.ordinal) // sides.back
|
||||
getInventorySize(context, new ArgumentsImpl(args.toArray.drop(1))) // drop side, just pass slot
|
||||
else super.getInventorySize(context, args)
|
||||
}
|
||||
|
||||
// TODO Remove in 1.5
|
||||
@Callback(doc = """function(side:number, slot:number):table -- Get a description of the stack in the the inventory on the specified side of the robot.""")
|
||||
override def getStackInSlot(context: Context, args: Arguments) = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user