1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-13 11:40:29 +00:00

Add equip and unequip for Pocket Computers

This commit is contained in:
Wilma456 2017-06-22 14:05:42 +02:00
parent 174b63d59a
commit 01c024d8b0
4 changed files with 16 additions and 2 deletions

View File

@ -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:
"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.

View File

@ -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:
"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

View File

@ -0,0 +1,6 @@
local ok, err = pcall( pocket.equipBack )
if not ok then
printError( "Nothing to equip" )
else
print( "Item equipped" )
end

View File

@ -0,0 +1,6 @@
local ok, err = pcall( pocket.unequipBack )
if not ok then
printError( "Nothing to unequip" )
else
print( "Item unequipped" )
end