Posted 14 October 2014 - 04:27 AM
VERSION:
ComputerCraft 1.63
DESCRIPTION:
turtle.compareTo previously returned "true" on items with matching IDs regardless of damage values. This was useful for repairing armor and tools, now it doesn't work. Now turtle.compareTo only returns "true" if items have the same ID and the same damage value. A replacement for the original functionality has not been provided in a MC 1.6.4 compatible version of ComputerCraft.
EXPECTED RESULT:
In ComputerCraft 1.58 items with the same ID but different damage values would return "true" when compared by turtle.compareTo. This allowed Crafty Turtles to repair armor and tools when given a large number of damaged items to sort through.
REPRODUCTION STEPS:
Place a Turtle
Give the player multiples of an armor or tool with random damage values with at least two having the same damage value. All items must be of the same ID.
Place the items in the turtle
enter the following test program
execute the test program.
Under previous behavior all print lines would have been true regardless of random damage values on like items.
SCREENSHOT/VIDEO:
Example in ComputerCraft 1.58
Example in ConmputerCraft 1.63
ComputerCraft 1.63
DESCRIPTION:
turtle.compareTo previously returned "true" on items with matching IDs regardless of damage values. This was useful for repairing armor and tools, now it doesn't work. Now turtle.compareTo only returns "true" if items have the same ID and the same damage value. A replacement for the original functionality has not been provided in a MC 1.6.4 compatible version of ComputerCraft.
EXPECTED RESULT:
In ComputerCraft 1.58 items with the same ID but different damage values would return "true" when compared by turtle.compareTo. This allowed Crafty Turtles to repair armor and tools when given a large number of damaged items to sort through.
REPRODUCTION STEPS:
Place a Turtle
Give the player multiples of an armor or tool with random damage values with at least two having the same damage value. All items must be of the same ID.
Place the items in the turtle
enter the following test program
bMax=3 --[[Set to number of filled slots]]--
for a=1,bMax do
turtle.select(a)
for b=a+1,bMax do
c=turtle.compareTo(B)/>/>
print(a," = ",b,"? ",c)
end
end
execute the test program.
Under previous behavior all print lines would have been true regardless of random damage values on like items.
SCREENSHOT/VIDEO:
Example in ComputerCraft 1.58
Example in ConmputerCraft 1.63