turtle_inventory event

From ComputerCraft
Jump to: navigation, search
turtle_inventory
Event
Returns

Source CC:Tweaked

Occurs when the inventory of a turtle is changed.

ExampleExampleWait for an inventory change
Prints "Inventory changed!" every time the turtle's inventory changes.
Code
while true do
  local event = os.pullEvent("turtle_inventory")
  print("Inventory changed!")
end