mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 13:42:59 +00:00 
			
		
		
		
	Merge pull request #329 from Wilma456/pocketequip
Add equip and unequip for Pocket Computers
This commit is contained in:
		| @@ -1,4 +1,5 @@ | |||||||
| equip is a program for Turtles. equip will equip an item from the Turtle's inventory for use as a tool of peripheral. | equip is a program for Turtles and Pocket Computer. equip will equip an item from the Turtle's inventory for use as a tool of peripheral. On a Pocket Computer you don't need to write a side. | ||||||
|  |  | ||||||
| ex: | ex: | ||||||
| "equip 5 left" will equip the item from slot 5 of the turtle onto the left side of the turtle | "equip 5 left" will equip the item from slot 5 of the turtle onto the left side of the turtle | ||||||
|  | "equip" on a Pocket Computer will equip the first item from your inventory. | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| unequip is a program for Turtles. unequip will remove tools of peripherals from the specified side of the turtle. | unequip is a program for Turtles and Pocket Computers. unequip will remove tools of peripherals from the specified side of the turtle. On a Pocket Computer you don't need to write a side. | ||||||
|  |  | ||||||
| ex: | ex: | ||||||
| "unequip left" will remove the item on the left side of the turtle | "unequip left" will remove the item on the left side of the turtle | ||||||
|  | "unequip" on a Pocket Computer will remove the item from the Pocket Computer | ||||||
|   | |||||||
| @@ -0,0 +1,6 @@ | |||||||
|  | local ok, err = pcall( pocket.equipBack ) | ||||||
|  | if not ok then | ||||||
|  |     printError( "Nothing to equip" ) | ||||||
|  | else | ||||||
|  |     print( "Item equipped" ) | ||||||
|  | end | ||||||
| @@ -0,0 +1,6 @@ | |||||||
|  | local ok, err = pcall( pocket.unequipBack ) | ||||||
|  | if not ok then | ||||||
|  |     printError( "Nothing to unequip" ) | ||||||
|  | else | ||||||
|  |     print( "Item unequipped" ) | ||||||
|  | end | ||||||
		Reference in New Issue
	
	Block a user
	 Daniel Ratcliffe
					Daniel Ratcliffe