Difference between revisions of "Turtle.equipLeft"

From ComputerCraft Wiki
Jump to: navigation, search
m
m (Fixed)
Line 3: Line 3:
 
|name=turtle.equipLeft
 
|name=turtle.equipLeft
 
|api=turtle
 
|api=turtle
|returns=true, or false if an invalid item was in the selected inventory slot.
+
|returns={{type|boolean}} was the item equipped successfully?
 
|addon=ComputerCraft
 
|addon=ComputerCraft
 
|desc=As of ComputerCraft 1.6, [[turtle]]s may have items added to (or even removed from!) them outside of the crafting grid. If a valid item exists in the currently selected inventory slot, this command places it on the turtle's left side. If an item was already present there, it'll be placed back into the inventory in the currently selected slot (assuming it's not taken up by eg an item that the turtle couldn't equip). Both actions can be performed in one go, allowing turtles to instantly swap tools.<br><br>
 
|desc=As of ComputerCraft 1.6, [[turtle]]s may have items added to (or even removed from!) them outside of the crafting grid. If a valid item exists in the currently selected inventory slot, this command places it on the turtle's left side. If an item was already present there, it'll be placed back into the inventory in the currently selected slot (assuming it's not taken up by eg an item that the turtle couldn't equip). Both actions can be performed in one go, allowing turtles to instantly swap tools.<br><br>
  
Turtles may equip [[Turtle#Recipes|most any item they could be crafted together with]].<br><br>
+
Turtles may equip [[Turtle#Recipes|mostly any item they could be crafted together with]].<br><br>
  
See also: [[Turtle.equipRight|turtle.equipRight()]]
+
See also: [[Turtle.equipRight]]()
 
|examples=
 
|examples=
 
{{Example
 
{{Example
 
|desc=Executed on a standard melee turtle (with a sword on its left side), and assuming a diamond pick is in the currently selected inventory slot, turns it into a miner turtle.
 
|desc=Executed on a standard melee turtle (with a sword on its left side), and assuming a diamond pick is in the currently selected inventory slot, turns it into a miner turtle.
|code= turtle.equipLeft()
+
|code= '''turtle.equipLeft()'''
 
}}
 
}}
 
}}
 
}}
  
 
[[Category:API_Functions]]
 
[[Category:API_Functions]]

Revision as of 16:39, 10 April 2014


Grid Redstone.png  Function turtle.equipLeft
As of ComputerCraft 1.6, turtles may have items added to (or even removed from!) them outside of the crafting grid. If a valid item exists in the currently selected inventory slot, this command places it on the turtle's left side. If an item was already present there, it'll be placed back into the inventory in the currently selected slot (assuming it's not taken up by eg an item that the turtle couldn't equip). Both actions can be performed in one go, allowing turtles to instantly swap tools.

Turtles may equip mostly any item they could be crafted together with.

See also: Turtle.equipRight()
Syntax turtle.equipLeft()
Returns boolean was the item equipped successfully?
Part of ComputerCraft
API turtle

Examples

Grid paper.png  Example
Executed on a standard melee turtle (with a sword on its left side), and assuming a diamond pick is in the currently selected inventory slot, turns it into a miner turtle.
Code
turtle.equipLeft()