mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-13 19:50:31 +00:00
Add equip and unequip for Pocket Computers
This commit is contained in:
parent
174b63d59a
commit
01c024d8b0
@ -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
|
Loading…
Reference in New Issue
Block a user