1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-03 07:03:00 +00:00
Files
CC-Tweaked/doc/events/peripheral_detach.md
Jonathan Coates 70a24d371d Update build.gradle to more closely match CC:T's
- Adds cct-javadoc fun and renables checkstyle (yay?)
 - Fixes a few javadoc and formatting issues
 - Cherry pick the docs so illuaminate doesn't complain
2021-11-27 09:32:25 +00:00

518 B

module: [kind=event] peripheral_detach see: peripheral For the event fired when a peripheral is attached.

The @{peripheral_detach} event is fired when a peripheral is detached from a side or from a modem.

Return Values

  1. @{string}: The event name.
  2. @{string}: The side the peripheral was detached from.

Example

Prints a message when a peripheral is detached:

while true do
  local event, side = os.pullEvent("peripheral_detach")
  print("A peripheral was detached on side " .. side)
end